On Saturday 03 December 2005 21:35, Larry K wrote: > Anyone care to post their scipt to back up/compress their database? I > suppose I could write my own, but why reinvent the wheel? :)
It's not big or clever[0] but this works for me, keeps 7days worth of compressed + one uncompressed latest backup, the --add-drop-table isn't really needed but I use it as it makes it easier (for me) to mix and match what tables to restore. #!/bin/bash /usr/bin/mysqldump -all --add-drop-table -u mythtv -pmythtv mythconverg -c > /home/backup/latest_db_backup.sql cp /home/backup/latest_db_backup.sql /home/backup/db_backup_$(date '+%u').sql gzip -f /home/backup/db_backup_$(date '+%u').sql HTH David [0] Simple means less to go wrong :-)
_______________________________________________ mythtv-users mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
