So I was looking around today for some info on mysql backups and I came across some other interesting stuff. I decided to post it for you as it may help you.
Optimize your database via cron
I would suggest doing a backup before running this as optimizing and using auto-repair can cause data loss under some circumstances.
Enter the following in cron
Please Login or Register to read the rest of this content.
Backup database to folder via cron
Want to automatically backup your database daily or weekly and save it in a folder on your server?
Enter the following in cron
Please Login or Register to read the rest of this content.
Note that this will overwrite the previous backup so it will not fill up your system with tons of files.. Create multiple (7) cronjobs and change mysql_backup.gz to weekdays to backup the database daily.
Send your database to an email address via cron
But here’s the best of them all. This little script when run by cron will email you a copy of your database! Remember that many hosts have a limit to the size of attachments they will accept.









