webresellers Posted March 17, 2007 Share Posted March 17, 2007 This script finds all of the MySQL databases on your server if using the root user account, or just the databases associtated with the MySQL username, individually backs them up (for easy recovery of specific data), compresses them, and stores the file(s) in a specified directory and/or emails it to you. Very configurable. zip file contains: backup_dbs.php = encrypted core script file backup_dbs_config.php = configuration file lock.php = required encryption key file readme.txt (Core script is encrypted and will be released to Matt if he would like to incorporate into WHMCS) Can be executed via www or cron... Example output when script runs: 2007-03-16 22:23:42: Executing MySQL Backup Script v1.4 2007-03-16 22:23:42: Processing Databases.. 2007-03-16 22:23:42: Dumped DB: user_mysqldb 2007-03-16 22:23:43: Compressed DB: user_mysqldb 2007-03-16 22:23:43: Archiving files.. 2007-03-16 22:23:43: Backup complete! 2007-03-16 22:23:43: Emailing backup to user@domain.com .. DISCLAIMER This script has been tested extensively, but I take no responsibility for any damages caused by misuse, improper configuration, or differences in server configurations. DOWNLOAD HERE 0 Quote Link to comment Share on other sites More sharing options...
rickenbacker Posted May 14, 2007 Share Posted May 14, 2007 Hi, I am getting this error below when trying to run this script from browser, any ideas on what I could be doing wrong? I think I have given correct file permissions (chmod the lock file to 777 as it requested. (I have changed 'myusername' below for this post). [b]Warning[/b]: is_dir() [[url='function.is-dir']function.is-dir[/url]]: open_basedir restriction in effect. File(/db_backups) is not within the allowed path(s): (/home/myusername:/usr/lib/php:/usr/local/lib/php:/tmp) in [b]/home/myusername/public_html/script/lock.php(5) : eval()'d code(1) : eval()'d code(1) : eval()'d code[/b] on line [b]149[/b] [b]Warning[/b]: mkdir() [[url='function.mkdir']function.mkdir[/url]]: open_basedir restriction in effect. File(/db_backups) is not within the allowed path(s): (/home/myusername:/usr/lib/php:/usr/local/lib/php:/tmp) in [b]/home/myusername/public_html/script/lock.php(5) : eval()'d code(1) : eval()'d code(1) : eval()'d code[/b] on line [b]150[/b] [b]Notice[/b]: Undefined index: f_log in [b]/home/myusername/public_html/script/lock.php(5) : eval()'d code(1) : eval()'d code(1) : eval()'d code[/b] on line [b]80[/b] Backup directory could not be created in /db_backups [b]Notice[/b]: Undefined index: f_err in [b]/home/myusername/public_html/script/lock.php(5) : eval()'d code(1) : eval()'d code(1) : eval()'d code[/b] on line [b]80[/b] Backup directory could not be created in /db_backups Backup directory could not be created in /db_backups 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted May 14, 2007 Share Posted May 14, 2007 Hey, You have open_basedir enabled, meaning you can't have PHP scripts go outside your /home/user folder. You would have to disable open_basedir for that account. You can find this in root WHM, under security tweaks. From, Adam 0 Quote Link to comment Share on other sites More sharing options...
rickenbacker Posted May 14, 2007 Share Posted May 14, 2007 Thanks for that Adam, what you said made me realise what I was doing wrong and was so simple. . . all that was missing was /home/myusername/public_html/db_backups Now works like a dream and has emailed me a backup Cheers and thanks also goes to 'webresellers' for this great script Mick 0 Quote Link to comment Share on other sites More sharing options...
Daniel Posted August 27, 2007 Share Posted August 27, 2007 I'm getting these errors.. Executing MySQL Backup Script v1.4Processing Databases.. DUMP FAILED DUMP FAILED COMPRESSION FAILED COMPRESSION FAILED DUMP FAILED DUMP FAILED COMPRESSION FAILED COMPRESSION FAILED Any ideas? The username and password are fine.. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted August 27, 2007 Share Posted August 27, 2007 try running the command from the script one at a time and check they work on your system - kind of a standrad debug technique but from the kind of errors your're seeing I'd suggest you've probably run out of disk space or have a permissions problem. 0 Quote Link to comment Share on other sites More sharing options...
Daniel Posted August 27, 2007 Share Posted August 27, 2007 Testing it on a dev box gave the error messages above so I thought i'd try it on another server and it worked fine which is odd.. Anyway, it works fine now, great little script.. Thanks 0 Quote Link to comment Share on other sites More sharing options...
VN-Ken Posted December 21, 2007 Share Posted December 21, 2007 What would the unlock key be? 0 Quote Link to comment Share on other sites More sharing options...
firas Posted July 21, 2011 Share Posted July 21, 2011 Dear webreseller, Thank you very much for your script, but i wonder why you have it encrypted ? i could not trust any encrypted (non-official) script. could somebody confirm that the script is clean before we use it ? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.