[mythtv-users] Trunk: Recordings all vanished?

Phil Linttell phil.linttell at rogers.com
Thu Jul 8 17:40:37 UTC 2010


> Date: Thu, 8 Jul 2010 09:41:30 -0500
> From: Kevin Kuphal <kkuphal at gmail.com>
> Subject: Re: [mythtv-users] Trunk: Recordings all vanished?
> On Thu, Jul 8, 2010 at 9:24 AM, Phil Linttell <phil.linttell at rogers.com>wrote:
>> >  I'm currently running Trunk (25279) and all my recordings have all
>> > disappeared from "Watch Recordings", apart from one program that has
>> > just finished recording.  I've verified that my recordings drive is
>> > mounted, and the recordings themselves can be played from mplayer.  I've
>> > run optimize_mythdb.pl, and restarted the back-end.... still no
>> > recordings.
>> >
>> > The table seems to have been wiped.  The "recorded" table in mysql has
>> > only the one, new, row in it.
>> >
>> > Looking at "Previously Recorded" programs appears to be intact.  The
>> > other tables appear to be fine too, as far as I can tell.   Videos,
>> > recording rules.... all okay.
>> >
>> > What's the best approach to recovering/re-populating the table?  The
>> > last database backup was done about a week ago, as part of the schema
>> > upgrade from 0.23-fixes to trunk...   do I need to restore the
>> > database?  Or can I just use myth.find_orphans.pl to put everything back?
>> >
>> > As for why the table disappeared...  I had a power failure last
>> > night.... could that account for one table in a mysql database vanishing?
> Yes.  I recently had a database crash of some kind while I was away that
> took out 14 tables in my mythconverg.  In MySQL, they are files so they can
> be damaged individually.  Restoring that table from backup is your best
> option.  I believe the official recommendation would be to restore the
> entire DB to it's pre-trunk upgrade state and let trunk re-do the schema
> upgrades, etc.
>
> This would also be a good time to look into some simple scripts to
> backup/dump the database regularly to another drive.
Thanks for the advice, Kevin.

I did a database restore, from before the trunk schema upgrade, which as
it turns out was only 4 days old.   Then I used myth.find_orphans.pl to
remove database entries for recordings which had been physically
deleted.  Then I ran mythfilldatabase to get the listings up-to-date. 
Then I used myth.rebuilddatabase.pl (despite the warnings) to restore
database entries for the 36 recordings that were made since the database
backup.  For good measure,  and optimize_mythdb.pl

Interestingly, myth.find_orphans.pl still believes the 36 recordings are
orphans and wants to delete them, even though they've been added back to
the database, had their lengths fixed, seek-tables re-built, and they
play fine.   Oh well.... I can live with that little mystery.  At least
I have all my recordings back.

And....  I've set up a cron job to look after daily database backups.  I
guess I'd been lulled into complacency by never losing mysql data
before, despite many, many crashes over the last year or so.






More information about the mythtv-users mailing list