obs wrote:
Note if you're running a database such as mysql you'll want to run mysqldump first or you may end up with a backup with an database in an inconsistent state.
Or if you feel like something more advanced you can use lvm snapshots but that requires fiddling with your partition setup.
Yep, I could have posted that, was in a hurry, here's my two cron lines minus the times, that do my MySQL and Postgres backups on a not to interfere basis with the rsync backup (I think I found that tr stuff for constructing a filename on these forums):
Code:
/usr/bin/mysqldump -u root -ppassword --all-databases | gzip > /root/databasebackups-mysql/database_"`date | tr \" \" \"-\"`".sql.gz
/usr/bin/pg_dumpall -h localhost -U postgres | gzip > /root/databasebackups-postgres/database_"`date | tr \" \" \"-\"`".sql.gz
FYI for the reader, you'll want to set up a .pgpass file.