Hi,

I just thought I'd pass the knowledge...

While my cron has been running the following for quite some time:

mysqldump -u root -pPASSWORD mythconverg -c | gzip -c >
/myth/mythtv_backup..sql.gz

I almost lost my DB yesterday when the volume (root in my case) filled
itself. I noticed the problem after the above command ran, thus
overwriting my DB backup. (doh!)

Fortunately, I rsync my /myth volume weekly (which caused the problem
in the first place since /mnt was not mounted... anyway. :) and a
valid backup was still on the synced volume.

Btw, here's the command I use to rsync:

/usr/bin/rsync --progress -ru --delete /myth /mnt

In order to avoid future problems, I changed the cron job for the DB backup to:

mysqldump -u root -pPASSWORD mythconverg -c | gzip -c >
/myth/mythtv_backup.`date '+%w'`.sql.gz

â which will create a seven day fallback just in case. (Check out the
man page of date for more option like %w -- %w = weekday where
0=sunday.)

In the hopes that some potentially poor soul will implement something
similar on their system. :)

And, that make me think, would it not be a good idea to have something
directly in Myth to deal with DB backups or should it be handled
purely outside like my cron job...?

Hasta,
cyth
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to