Support Forum Articles File Help Startup DB Tips Service DB Hijack This! Analyzer


MySQL DB backup - Automated shell script
Step 3: Customize it

DBNAME = the name of your database
/FULL/PATH = the full path to where you'd like to put the DB dumps
mysqldumpcmd=/usr/bin/mysqldump In a lot of cases this will work, you'll want to use locate mysqldump to find the location of yours.
USER and PASS = Whatever username and password you need to connect to your MySQL Database
backup and psacln = This is for setting your FTP permissions for you to be able to FTP in and download this backup file.

Step 4: Execute Permissions

chmod +x /usr/dbbackup

Step 5: Schedule

Use Cron to schedule this task to be run as often as you would like. I personally do them every single night! My article on cron can be found here.

Step 6: Download the DB!

Of course don't forget to download those files every so often! I've written a guide to having windows automatically grab these files and posted it here.

The End:

I hope you enjoyed this, there's plenty of customizations that you can do to this system, if you need any help, please take it to the forum and somebody will do their best to help you solve your problem.

Written By: Martin Krohn
Date: 7-30-04
Views: 12930
Printer Friendly

Article Index:
Talk About it! -->