[mythtv-users] Anyway to export stats from Mythtv db

Marc drayson at net1plus.com
Sun May 11 10:31:13 UTC 2008

My mythtv's hdd died after recently migrating it to another server, I still
have my old 0.20.2 db and I just want the stats from it migrated into my
0.21 db.

Is this possible?


If you can get the old HDD running so that you get a copy of your old DB,

If you can export the entire database then just restore that and your good
to go. Myth will auto update the DB to the new version.
This method would however make your DB forget about any recordings made
since the new HDD was created. New recording would disappear from the
recorded list as well as from the stats. You could run the script to add the
missing recordings back in but you would still have no stats for them and
the recorded list would say recovered file XXX instead of the Show/Title.

This method is iffy, I'm not sure if it would work.
Find out your old dbschemavar
Copy the following files from your old hdd to the new:
Change your dbschemavar in the settings table to match your old db version
and run myth. It should auto update your database to match the new expected
version which would update oldrecorded to the new db.
Like the first method you would lose all your current stats but you should
still have your current recordings in the recordings list.

This last method is the best.
If you could somehow export your oldrecorded table from the other machine
you could import that data into the new database.
This method would result in you having the old stats added to the new stats
and not make you lost record of the new recordings.
You may be able to do this by combining method 2 with this one if it even
Create a new database and create the oldrecorded table in it.
Copy the files listed above from the old machine to the new database.
Run mythexport on the table and then import the data into your current myth


More information about the mythtv-users mailing list