[Lias] MySQL backup

Craig Ringer craig at postnewspapers.com.au
Thu Jul 17 08:42:35 UTC 2003


> How about a cron job in the middle of the night that does:
> 
> mysqldump -p<password> --opt <database> | gzip -c - > <filename>.gz

Using 'date -I' can be very handy with your backups. Even though you're
writing to some removable media as well, it can be handy to have
multiple on-line copies of the backups in case you need one.

mysqldump -p<password> --opt <database> | gzip -c - > <filename>.`date
-I`.gz





More information about the lias mailing list