Migrating database from md-10 to md-12
It took some searching, but I got my md-10 database moved over to a new md-12 box. This is how I did it: (links I used are at the end)
1. Assume the md-12 box has already been installed and is generally working.
2. Use md-10 to backup the database
- mythdora tools > backup
- mythconverg.sql.gz will be created on /storage/dorabackup
2. Copy mythconverg.sql.gz to a usb drive
3. Copy mythconverg.sql.gz from the usb drive to /storage/dorabackup on the new md-12 box
- I used the Nautilus file browser
4. Stop mythbackend on the md-12 box
[root@nick dorabackup]# /etc/rc.d/init.d/mythbackend stop
5. Drop the mythconverg database
[mythtv@nick dorabackup]$ mysql -uroot -p -e 'DROP DATABASE IF EXISTS mythconverg;'
- Big Note - Use extreme caution here...this deletes the existing database (which should be pretty much empty because you just installed it) ...be sure you do the right one!
- Note - when asked for the password, just hit enter
- Note - if running as user "mythtv", the mysql password is also "mythtv"
6. Create a new blank mythconverg database
[mythtv@nick dorabackup]$ mysql -uroot -p < /usr/share/doc/mythtv-docs-0.21/database/mc.sql
7. Identify the hostname of each box (you will be using the full name in a minute)
[mythtv@nick dorabackup]$ hostname
vanson.myhostname.net
8. Restore the database to the new md-12 box
[mythtv@nick dorabackup]$ mythconverg_restore.pl --directory /storage/dorabackup --filename mythconverg.sql.gz
9. Correct the hostname in the restored database of the md-12 box
[mythtv@nick dorabackup]$ mythconverg_restore.pl --change_hostname --old_hostname="vanson.myhostname.net" --new_hostname="nick.myhostname.net"
10. Start mythsetup and allow it to update the database. Also correct any capture board setups you have. I had to delete and recreate capture board and input connections. When done, exit mythsetup.
11. Start the mythbackend
[root@nick dorabackup]# /etc/rc.d/init.d/mythbackend start
12. Run mythfilldatabase
[mythtv@nick dorabackup]$ mythfilldatabase
13. Stop the mythbackend again.
[root@nick dorabackup]# /etc/rc.d/init.d/mythbackend stop
14. Run mythfrontend; it will want to update other parts of the database. Let it update, then exit mythfrontend.
15. Start the mythbackend again.
[root@nick dorabackup]# /etc/rc.d/init.d/mythbackend start
16. Start mythfrontend and watch tv....you should be done.
Note - these are the links I used to figure this out:
http://www.gossamer-threads.com/lists/mythtv/users/421400
"mtdean at thirdcontact" had a pretty good procedure; I modified it a little to use the mythdora backup tools (Things I do recommend:....)
Also:
http://www.mythtv.org/wiki/Database_Backup_and_Restore
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Change_the_hostname_of_a_MythTV_frontend_or_backend

question about hostnames
Do the hostnames of the old and new need to be the same.
I seem to recall that the database references the hostname when addressing recordings.
AN
That was an important point
You're right, the hostname in the database needs to match the hostname of the computer, which is why my first three attempts did not work....I didn't know that. When I put a new box into service, I always use a different name and move everything over.
For a while, both are in service at the same time, so the names have to be different. But the backup/restore instructions tell you to name the new box the same as the old box, which does not work for me. When I attempt to re-use an existing name, it really gets things confused; things tend to end up in the wrong place. So, I just don't reuse names.
When I discovered the script to correct the names, it all worked.