[mythtv-users] 0.21 and database corruption/how to rebuild and update from backup

Michael T. Dean mtdean at thirdcontact.com
Mon Mar 17 21:15:32 UTC 2008


On 03/17/2008 04:56 PM, Bob Sully wrote:
> I just did the upgrade from 0.20.2 to 0.21 via rpm yesterday.
>
> So far, I have to say that I'm impressed with some of the new features. 
> MythWeb is very nicely done, Weather seems to work (though I'm getting
> erroneous temperature data from the Beeb's website for the "current
> conditions" - but that's not a Myth issue).  I like the fact that the DVB
> channel scan now ignores encrypted channels.
>
> However, I'm glad that I backed up my entire system (except the recordings
> themselves) before doing the upgrade.
>
> I use two pcHDTV 5500 cards, along with FireWire and the S-Video from my
> STB (since the FireWire only gives me the same unencrypted channels as the
> raw cable).
>
> Therefore, I have three separate "video sources" all from the same
> Schedules Direct channel list - "Clear", "Analog" (for the analog tuners,
> obviously), and "All channels" (for the S-video off the STB).
>
> Well, after the upgrade, all three of the sources had ALL of the
> channels...the only thing I can figure is that mythfilldatabase ran
> without the "delete new channels" option.
>
> Rather than manually deleting channels, I tried clearing the entire
> channel database and rescanning.  However, re-assigning all of the DVB
> channels and XMLTV IDs is becoming very tiring.  Is there any (relatively
> easy) way I can copy my backup (0.20.2) mythconverg database back into the
> new installation and then upgrade to the new schema (after adding "delete
> new channels" to the mythfilldatabase directive in Setup)?  Before
> upgrading, I simply backed up the files with rsync.

If you did http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 , then 
follow the second half of the instructions to restore.  You'll need to  
drop the database before your do the restore (i.e. "DROP DATABASE 
mythconverg;").

If you backed up the MySQL binary files, you may be in luck because 
MythTV tries to make a backup of your database before upgrading the 
schema.  You should see a file mythconverg-<schemaver>-<datetime>.sql 
(possibly with a .gz extension) in your recordings directory (the one 
that was configured as your main recordings directory in 0.20).  You can 
use that to restore as described at 23.5 (see link above).  If the 
backup has a .gz extension, you'll need to do a "gunzip 
mythconverg-*.sql.gz" before sending (or as you send) the backup to the 
mysql command line client.

Note that any new recordings you created since the upgrade will be gone 
(easiest solution is to move them to MythVideo, watch, then delete them 
or just schedule them to be re-recorded).  Also, any new recording rules 
you've created since the upgrade will need to be recreated.  Of course, 
all the post-upgrade re-configuration (i.e. storage groups, etc) will 
need to be redone, too.

If you backed up the MySQL binary files and don't have the automatically 
created backup, you're on your own.  :)

Mike


More information about the mythtv-users mailing list