Best way to restore database tables

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
mythfreak
Junior
Posts: 29
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Best way to restore database tables

Post by mythfreak »

I just upgraded myth on a separate HDD. My current database is from v 0.27, obviously the schema is different on v .29. What is the easiest way to do the partial restore ... just export important tables from the old and import to the new? Does someone have this scripted?
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Best way to restore database tables

Post by pvr4me »

See:

https://www.mythtv.org/wiki/Database_Backup_and_Restore

Partial restore discussed at 5.2.4

Craig
Formerly the MacPorts guy.
mythfreak
Junior
Posts: 29
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak »

Perfect. Thanks.
mythfreak
Junior
Posts: 29
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak »

On a clean install, after installing Mythbuntu (.28 on 16.04)
echo "DBBackupDirectory=/home/mythtv" > ~/.mythtv/backupr and copied the backed up database to that directory.
mythconverg_restore.pl --drop_database --create_database --filename mythconverg-1317-20180711212033.sql.gz
Then I upgraded distros up to 18.04 and myth upgraded the schema automatically. Easy Peasy.
mythfreak
Junior
Posts: 29
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak »

Oh .. and the upgrade to 17.10 brought mythtv up to .29 automatically. I then went from 17.10 to 18.04LTS.
Post Reply