Pat Pawlowski

PHP Script to read a Sugar CRM configuration file, backup the database, and then gzip the backup Raw

Discussion created by Pat Pawlowski on Aug 7, 2017
Latest reply on Aug 9, 2017 by Enrico Simonetti

I guess that's a long title and it doesn't leave much left to explain. 

 

This one's pretty simple but helpful if you find the need to make backups often. I don't mind typing everything out for the most part except when I'm doing some kind of testing and need to create distinct backups over and over. That's when something like this comes in handy. 

 

You should be able to run it from pretty much anywhere as long as the path to the config.php resolves correctly.

php getdbbackup.php <path to config.php file>

I frequently put backups in a <sugar folder>/database folder that has a .htaccess that prevents downloads. So when I run it, it's typically like this: 

php getdbbackup.php ../config.php

 

PHP Script to read a Sugar CRM configuration file, backup the database, and then gzip the backup · GitHub  

 

Enjoy,

 

-pat

Outcomes