[mythtv-users] partial database restore

Leo Butler leo.butler at member.fsf.org
Tue Sep 17 13:23:26 UTC 2013


>   Date: Tue, 17 Sep 2013 00:11:08 +0100
>   From: UB40D <ub40dd at googlemail.com>
>
>   Restoring only the useful parts of a database
>
>   I had a mythbuntu system that would often give "recorder failed" and
>   litter the media library with 4 identical entries of the failed
>   recording, each with "this file cannot be found" if you selected it,
>   which were a pain to delete. Since I was not able to fix the issue, I
>   decided to reinstall everything from zero on a new hard disk. I did
>   take a backup of the database before reinstalling.
>
>   I would now like to restore the old recordings (the ones that work)
>   and their metadata. In particular what I'd like is, for each .mpg, its
>   name, description and the manually-entered cut list that defines the
>   ads to be skipped. I don't terribly mind losing the date that the
>   shows were recorded or the channel they came from, but I would very
>   much mind losing the cut lists and of course the film names, which I
>   understand would happen if I just copied the mpgs into the video
>   directory.
>
>   However I don't really want to restore all of the old database which
>   is full of that junk (empty entriesfor orphaned recordings
>   that never happened). I am also suspicious that the
>   faulty behaviour of the old system was perhaps due to
>   slightly incorrect backend configuration (channels, capture cards,
>   video sources, input connections etc) that might be stored in the
>   database as well; I don't want to overwrite the new ones of the
>   reinstalled system that finally work with the old ones that didn't.
>
>   I have read
>   http://www.mythtv.org/wiki/Database_Backup_and_Restore#Change_the_hostname_of_a_MythTV_frontend_or_backend
>   and noticed their insistence on how bad a partial restore is, and that a
>   full restore is what every sane person should do. However I fear that
>   if I do a full restore I'll end up with as broken a system as the one I had
>   before reinstalling.
>
>   I would simply like to restore the names and cut lists of the .mpgs
>   that I have. Nothing else. Can I? What should I do? Is it OK to take the
>   database dump and, before importing it, delete everything except the
>   statements for the tables that contain the names and cut lists?

I had an analogous problem a month ago: a table in the mythconverg
database was marked as crashed and couldn't be repaired by mysql. I
didn't want to do a full restore, so I went back and found the last
uncrashed backup (about a week prior). I just used a sed script to cut
out the table from the backup and pulled that into the db. It has
worked well for me.

I'm sure there's some amount of beginner's luck, though.

Leo


More information about the mythtv-users mailing list