Forum Moderators: phranque
What I have to offer is just the simple command line code my host provided years ago so I knew how to set up cron jobs (events that are scheduled to run at preset times on Apache web servers--may work on all Unix-based servers, but I'm not positive) to save out copies of my databases.
The script doesn't ZIP or tar the files, however, and I still manually download them daily.
/usr/bin/mysqldump -uYOURdbUSERNAME -pYOURdbPASSWORD --database YOURdbNAME > /path/to/save/SQLdumpData/to/FILENAME.sql
I set up multiple cron jobs, so the line above is repeated once for each database I need to backup, with appropriate values changed (YOURdbNAME, FILENAME.sql, etc.)
The following code dumps all tables to 1 file & pipes it to gzip for compression:
mysqldump -q MYdbase -u MYuser -pMYpassword ¦ gzip > PATH/all-sql-11-21-03.sql.gz;
You can invoke the code on a schedule with a cron job. Your script can change the file name based on the date or day of the week or email you the file as an attachment.
I hope this helps,
Bob
Since you are on a dedicated box, you won't have cpanel on there but I rely on that for super easy, single click, mysql backups/restores. Someone must know of an alternative out there (or how cpanel does it).