- create a file in /etc/logrotate.d, filename does not matter, take this as a
template, fill in connection parameters in mysqldump call ("xxxx"):
/home/backup/sqlback/mybackup.sql {
daily
nomissingok
nocreate
compress
rotate 14
errors [EMAIL PROTECTED]
prerotate
mysqldump xxxx --opt --full >/home/backup/sqlback/mybackup.sql
endscript
}
- check syntax and options of this file: "man logrotate"
- you're set: cron will call logrotate each night. logrotate processes each file in
the dir, executes the prerotate script and then compresses the "log"file (i.e.
SQL-Dump), renames older ones and keeps at max 14 of them ("rotate 14"). "nomissingok"
will let you know if the mysqldump failed
Felix
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php