[mythtv-users] Nuvexport from 0.14 to 0.15
bjm at lvcm.com
Tue Jun 1 17:02:17 EDT 2004
Steve Frank wrote:
> Sadly, I'm already up and running nicely in 0.15 without any additional
> stuff. I suppose I could upgrade the old machine from 0.14 to 0.15 and
> go from there... I was looking for an easy answer. :-)
If you have new database and old recordings you just need to
dump and restore the data for the recorded shows. NOTE: if
you are moving the files to a new host, you must change the
hostname in your restore file in order for the new server
to find the files on the given hostname.
Make a backup of your database right now:
Look in your file as see that it is thousands of lines of readable
text. Once you know up have a good current backup, then continue.
After you have and good backup, read the rest of this message and
decided you want to do this, go on to:
When you first run setup, mythbackend or mythfrontend, all the
tables will be created for your new database. Therefore, you don't
need any of the CREATE TABLE statement but only need the INSERT
INTO statements for the tables you need to restore.
Restore the information from "record' (the titles you've chosen
to record), 'recorded' (the descriptive info for your recording),
'oldrecorded' (for finding duplicates that you've recorded previously)
and 'recordedmarkup' (keyframe seek info, commercial skipping, etc).
grep "INSERT INTO record " mythtv_backup.sql > restore.sql
grep "INSERT INTO recorded " mythtv_backup.sql >> restore.sql
grep "INSERT INTO oldrecorded " mythtv_backup.sql >> restore.sql
grep "INSERT INTO recordedmarkup " mythtv_backup.sql >> restore.sql
Note the space after the table name and the ">>" to append to the
file for all but the first grep. "recordedmarkup" is huge and
may be hundreds of thousands of lines if you had lots of hours
If your hostname has changed, bring up restore.sql in an editor
to search and replace your old hostname with the new one being
careful to not replace if your old hostname appears in a show's title or description ;-).
Once your file is ready to go:
$ mysql -u mythtv -pmythtv mythconverg < restore.sql
If something goes terribly wrong you can:
$ mysql -u mythtv -pmythtv mythconverg
mysql> delete from record
mysql> delete from recorded
mysql> delete from oldrecorded
mysql> delete from recordedmarkup
then start over.
More information about the mythtv-users