[mythtv-users] Myth database "previously recorded table"
Michael T. Dean
mtdean at thirdcontact.com
Sat May 3 16:17:32 UTC 2008
On 05/03/2008 10:56 AM, Nik Gibson wrote:
> I recently had a disk crash on my myth box running 0.20, luckily I
> run a nightly cron job to backup the database. I figure this is a
> good time to perform a fresh install and upgrade to 0.21.
>
> Does anyone know if it possible to start with a fresh database and
> restore only the "previously recorded program" data?
Yes, but only if the backup is from the same version of MythTV. So,
when you upgrade, you can't do a "new hardware" restore... Not
directly, at least.
> Or should I perform a fresh install, restore the old database and
> then somehow upgrade the scheme?
Myth takes care of the upgrade for you (but only with a complete database).
However, if you still want to use the "spring cleaning" approach, you
may be interested in testing some scripts I've written for #4760. The
scripts will probably be incorporated into 0.22 (but work with any
version of Myth) to make backup and restore easier for users.
If you'd like to try them out (feedback/bug reports appreciated--direct
to me until they're officially part of Myth), you can get them at:
http://misc.thirdcontact.com/MythTV/database_mythconverg_backup.pl
http://misc.thirdcontact.com/MythTV/database_mythconverg_restore.pl
Remember that to run the scripts, you'll either need to do a:
chmod 755 database_mythconverg_*.pl
or run the script with:
perl -w database_mythconverg_restore.pl --help
And the backup script works very well in a cron job, too. I'm hoping to
get a lot of 0.21 users to test so that by the time 0.22 is released,
the scripts will be perfect (note that I've done a /lot/ of testing with
them, and I'm relying on them on my productions sytems).
From the "Quick Start" section of the restore scripts --help:
If you would like to do a partial/new-hardware restore and have upgraded
MythTV, you must first do a full restore, then start and exit
mythtv-setup (to upgrade the database), then create a backup, then drop
the database, then follow the instructions for doing a partial restore
with the new (upgraded) backup file.
Mike
More information about the mythtv-users
mailing list