[mythtv-users] mythtv-users Digest, Vol 56, Issue 54
matt.roberts at bigfoot.com
Tue Nov 13 01:07:25 UTC 2007
> I'm considering to change fron svn trunk to 0.20-fixes branch.
> How about mysql database? I know, that trunk has updated database schema.
> What is easiest way to revert back? I have made much changes to settings
> and I don't want to loose them. Also I'd like keep all data from
> recordings, autoexpire etc.
> If I drop all tables and recreate them with mc.sql, what tables I can
> safely recover from backup to new database? Or is there any that has no
I don't know if there's an easy way to revert back, but I can tell you what I
did a few weeks ago after discovering that the trunk was too volatile for my
I started with the instructions for moving data to new hardware
(http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7). It lists the 7
tables that are really important to preserve. The specific steps I took (as
I remember them) were:
1. Create a restore script as described in the "Moving Your Data to New
2. Create a script that will create the table structure for those 7 tables as
they exist in the currently installed version of myth
3. Create a backup of the settings and channel tables. These were for future
reference only, in my case. I didn't try to directly restore them.
4. Drop all tables
5. Uninstall 0.21
6. Install 0.20
7. Execute a myth program (mythtv-setup) so that all tables get created
(mc.sql does not do this, it only creates the database, user, and grants some
8. Edit the scripts created in steps 1 & 2 so they will restore the data to
tables with a unique name. I used '<table_name>_21', so 'recorded'
became 'recorded_21', etc.
9. Run the create and restore scripts
10. Compare the column list of the 0.20 tables with that of the 0.21 tables
and write some "insert into 0.20_table (select columns from 0.21_table)" SQL
statements that only pull data from columns common to both versions.
11. Run the SQL statements created in step 10.
It worked for me. The one thing that I have left which may be of value to you
is my "step 10" SQL. I assume it is still valid since I was downgrading to
0.20.2. Let me know if you'd like me to send it to you.
More information about the mythtv-users