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
Newcomer
Posts: 13
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Best way to restore database tables

Post by mythfreak » Wed Jul 11, 2018 1:16 am

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: 619
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Best way to restore database tables

Post by pvr4me » Wed Jul 11, 2018 11:22 am

See:

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

Partial restore discussed at 5.2.4

Craig
The MacPorts guy.

mythfreak
Newcomer
Posts: 13
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak » Wed Jul 11, 2018 5:52 pm

Perfect. Thanks.

mythfreak
Newcomer
Posts: 13
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak » Fri Jul 13, 2018 10:23 pm

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
Newcomer
Posts: 13
Joined: Wed Dec 14, 2016 12:00 am
United States of America

Re: Best way to restore database tables

Post by mythfreak » Fri Jul 13, 2018 10:24 pm

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

Post Reply