MythTV Backup

Moderators: snarkout, Patrick, dann, dmfrey

Post Reply
kwisher
Posts: 98
Joined: Fri Feb 13, 2009 8:36 pm

MythTV Backup

Post by kwisher » Sun May 20, 2012 1:47 pm

Hello All,

Is there a proven way to completely backup your existing MythTV setup and restore it to a fresh O/S install. In the past I have been able to restore my database but I loose all recording listings that haven't been watched. I heard Dann Washko mention something about backing up your /var/mythtv folder and restoring it after you install MythTV on a new system?? Iwould like to move my current two Myth systems to Ubuntu 12.4 or MythBuntu 12.4 for the LTS this summer sometime when I don't have a lot or recordings going on.

TIA

perato
Posts: 20
Joined: Wed Dec 23, 2009 8:50 pm

Re: MythTV Backup

Post by perato » Mon May 21, 2012 5:23 pm

In archlinux, the mythtv database files are located in /var/lib/mysql

If you have mysql's binary logs enabled (in archlinux it is enabled by default, I think), then the binary logs are also located in /var/lib/mysql

Some configuration settings are located in ~/.mythtv

I don't use an infrared remote so I don't know where those files are located.

You can also check http://www.mythtv.org/wiki/Database_Backup_and_Restore but I have not had success with the scripts on the mythtv wiki even with v0.24

I use archlinux and the upgrade from v0.24.2 to v0.25 went smoothly. No database problems and existing recordings remained in the database. v0.25 handles themes differently so you may get errors when upgrading saying that certain files related to themes already exist and the upgrade will fail. You can move the files elsewhere then continue the upgrade. Alternatively, just delete the theme files. Once upgrade is complete, you will have to select a theme from the new theme chooser accessible from mythfrontend.
Desktop PC: AMD Athlon64 3000+, 1 GiB RAM, Nvidia GeForce 8400 GS video card; Archlinux
MythTV PC: Intel Celeron E3300, 4 GiB RAM, ATI X550 video card, Hauppauge HVR-2250; Archlinux+MythTV v0.25

kwisher
Posts: 98
Joined: Fri Feb 13, 2009 8:36 pm

Re: MythTV Backup

Post by kwisher » Tue May 22, 2012 7:35 am

perato,

Thanks for your reply. Glad to see someone else besides me watches this forum.

Your reply refers to an upgrade path, which I have done successfully in the past. What I really want is a known good process for backing up your existing Myth system and restoring it to a freshly installed new O/S. Like I said in my original post, I have successfully been able to backup the Myth database and restore it to a fresh install, but I lose all references to existing recorded programs that are present on the system at the time of the database backup. What I usually end up doing is watching the missing recordings in VLC.

perato
Posts: 20
Joined: Wed Dec 23, 2009 8:50 pm

Re: MythTV Backup

Post by perato » Tue May 22, 2012 11:02 pm

If all you want to do is add video files to the recordings database then http://www.mythtv.org/wiki/Myth.rebuilddb.pl or http://www.mythtv.org/wiki/Find_orphans.py might be what you're looking for. I suggest testing it out first by trying to add one or a few video files to your existing recordings database. Just download a few files and use the script to add them to your existing mythtv recordings database and test it to see that it works. If you want to backup your entire database (not just recordings) and restore the entire database then you might want to check the link in my previous post. If you want to go this route, you should ask busier forums like the http://www.mythtvtalk.com/forum/ and http://www.gossamer-threads.com/lists/mythtv/users/ because many perl scripts on the mythtv wiki don't work with v0.25.

http://ubuntuforums.org/showthread.php?p=11931975 may also help. That forum thread suggests using videos instead of recordings but that may not be suitable if you want commercial detection.
Desktop PC: AMD Athlon64 3000+, 1 GiB RAM, Nvidia GeForce 8400 GS video card; Archlinux
MythTV PC: Intel Celeron E3300, 4 GiB RAM, ATI X550 video card, Hauppauge HVR-2250; Archlinux+MythTV v0.25

kwisher
Posts: 98
Joined: Fri Feb 13, 2009 8:36 pm

Re: MythTV Backup

Post by kwisher » Sun Jun 24, 2012 11:19 am

This week I had the "opportunity" to test restoring my master backend/frontend system due to a power outage problem. Even though this system is connected to a UPS, for some reason the system would not boot after a minor power blip. Here are the steps I took to get back to a fully functioning system after a major crash:

1) Restored a Clonezilla image from Dec. 2011.
2) From the CLI did a apt-get update & apt-get dist-upgrade to get the system up-to-date from the Clonezilla restore, rebooted system.
3) Restored my /var/lib/mythtv directory from a BackInTime daily backup.
4) Restored a mythconverg MSQL database dump/backup (generated daily with Webmin).
5) Went into the backend setup and just had to toggle through the tuner card settings and input settings, making no changes.
6) Manually did a mythfilldatabase update.

After starting the frontend, everything was back to normal. All recordings & livetv were still functional as if nothing happened. After confirming full funtionality, made another Clonzilla backup. I have now added a calender reminder to do a Clonezilla backup each month.

Pat & Dan, I would be happy to join you guys on a future podcast to discuss this process for the benefit of your listeners.

Post Reply