Difference between revisions of "User Manual:Periodic Maintenance"
|Line 21:||Line 21:|
This will keep a
This will keep a backup of the last 7 days. Notice that the dump location is on a remote server, for added protection.
=== The media ===
=== The media ===
Revision as of 16:48, 16 January 2006
Maintaining your MythTV
Your MythTV system can continue to run for weeks, months or even years. Of course, this is unlikely for several reasons. First of all, you can't keep your hands of! Yes, you're a techie and you like to fiddle. Second, hardware can and will fail eventually. Third, power-outages, tornados, alien takeovers and other unfriendly environmental disasters happen. But, if you are interested in keeping your MythTV alive for as long as possible, here's a few suggestions.
Your system is only as good as your backup. What? No Backup? You can't be serious... Well, now is the time to start backing it up. Why? Although you had fun building it and are confident you can rebuild quickly so you don't miss your favorite shows, there are two parts of MythTV that aren't easily replaceable: the database, and your media content (TV recordings, videos, photos, music, etc.)
The database stores a whole lot of stuff you will only miss when it's gone. For example, it keeps a history of every show you've recorded, which is very nice when you don't want to re-record the same show over again. It keeps all the settings of your backends and frontends, it keeps metadata of all your videos (titles, director, parental levels, etc), it keeps all the commercial flaggings, and more.
Probably the easiest way to backup the database is to create a cron job that will dump the data out to a file. Here's a sample script that I put in /etc/cron.daily/
#!/bin/sh #Dumps the mythconverg database - daily backup #Keeps the last 7 days DAY=($(date +%u)) DUMPFILE="mythbe_"$DAY".sql" mysqldump -u mythtv -pmythtv mythconverg -c > /mnt/foo/sqldump/$DUMPFILE exit 0
This will keep a rotating backup of the last 7 days. Notice that the dump location is on a remote server, for added protection.
TODO: media backup
OS and software maintenance
I'll start by saying: If it ain't broke, don't fix it! This is more difficult to follow if your MythTV servers other purposes besides Myth. I might add that if you have non-technical people using Myth for their daily TV watching, they will appreciate you keeping your hands. If you must mess, please be sure to backup before you do. Expect that fixing one thing will break another.