| How to backup all your MySQL Databases on a Daily basis using a CentOS operating system |
|
|
|
| Tuesday, 21 July 2009 06:41 | |
|
Please note: You might need root access to the server. Create a new file in /etc/cron.daily called mysql-backup.cron
Add the following in that file:
The first line contains the Shebang. The second line creates a variable containing today's date. Example: YYYY-MM-DD The 3rd line will use the mysqldump utility, log in as root, then dump all your databases and pipe the output to gzip where you'd like to store your file. You might want to consider to add the following to your cron as well:
This will ensure that you're disk space won't be used up eventually. All files older than 673 hours (± 1 Month) would be removed after you've made your backups.
|
|
| Last Updated ( Thursday, 20 August 2009 13:44 ) |




