[mythtv-users] Migrate recording schedules and recorded programs to 0.21
Michael T. Dean
mtdean at thirdcontact.com
Sat May 17 02:13:39 UTC 2008
On 05/16/2008 09:08 PM, Brian Phillips wrote:
> I've been running mythdora4 for a while now (mythtv 0.20.2) and am looking
> to migrate to 0.21. I don't want to bring the entire database with me to
> 0.21, as it's nice to sometimes "clear out the cobwebs".
>
But not when upgrading...
> I'd really only like to bring my current set of recording schedules, my
> recorded programs from the "watch recordings" menu, and I'd also like to
> bring all the previously recorded stuff (so I don't re-record programs I've
> already recorded).
>
> Glancing over mythconverg, I think I only need to grab the following tables:
> record
> recorded
> recordedcredits
> recordedfile
> recordedmarkup
> recordedprogram
> recordedrating
> recordedseek
> recordmatch
> oldprogram
> oldrecorded
>
> Course, I could be mistaken in what I need to grab. Has anyone done
> something like this and want to share relevant SQL commands that they used?
> Thanks.
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7
However (and that's a /very/ big however), you can /not/ do this when
upgrading. You /must/ import the complete 0.20-fixes database (or leave
it in place--whatever), then start mythtv-setup to let it upgrade the
database to 0.21 format, then exit mythtv-setup, and then do a backup of
the 0.21 database, then use the 23.7 instructions with the 0.21 backup
to do your spring cleaning.
Oh, and you might be interested in testing some scripts that should be
in 0.22 (but that work with any version of MythTV). One creates backups
of the database for you (and can be run from cron or a MythTV
startup/shutdown script) and will compress and rotate backups (by
default keeping 5 backups). The other script restores the
database--even allowing for a single-command "new host"/partial restore
(i.e. what you want to do)--from a compressed or uncompressed backup.
I'm soliciting testers and feedback. They've been well tested (and have
been tested a /lot/), I just need to get a lot of people to test them on
a lot of differently-configured systems.
http://misc.thirdcontact.com/MythTV/database_mythconverg_backup.pl
http://misc.thirdcontact.com/MythTV/database_mythconverg_restore.pl
To backup your DB:
# echo "DBBackupDirectory=/home/mythtv" > ~/.mythtv/backuprc
# ./database_mythconverg_backup.pl --verbose
Once you get that working, you can run the script (i.e. in cron or
whatever) without the --verbose switch.
To restore the DB (assuming you've already specified your
DBBackupDirectory, as above) using a full restore with the most current
backup in the DBBackupDirectory:
# ./database_mythconverg_restore.pl --verbose
or, to specify a backup file:
# ./database_mythconverg_restore.pl --verbose \
--filename "mythconverg_1214_20080515221324.sql.gz"
To do a partial restore (using the most current backup):
# ./database_mythconverg_restore.pl --verbose --partial_restore
Again, --verbose is only required if you like to see what it's doing,
and feel free to specify the backup filename.
See, also, the --help output for each script (for far more info than you
probably want).
Thanks,
Mike
More information about the mythtv-users
mailing list