[mythtv-users] Another "moving backend / restoring database" thread
Jon Whitear
jon at whitear.org
Fri Feb 19 00:36:24 UTC 2010
Hello folks,
I'm in the process of changing my backend from a physical server running Gentoo to a virtual server running Mythbuntu. Both are running current 0.22-fixes. The Mythbuntu box is a new install of 9.10. The Gentoo box has been running since about 0.13; when I upgraded it from 0.21 to 0.22 I followed the instructions about corrupted databases (given that my Gentoo install us UTF8) but it seems from the output below that I still have a UTF8 database.
The Gentoo box has a PCI DVB-T card, while I've bought an HD Homerun for use on the virtual. I have configured the virtual with the new tuners, a source, and the shepherd grabber to test that it all works. It does.
What I would like to do, given that the new box is essentially up and running with a clean database and already configured with tuners and listings, is simply 'move' my recordings from the old box to the new. However, the documentation advises that a full restore (with a name change) should be my preferred path.
Here's my plan of action:-
1) Stop both mythbackends
2) Backup both databases (old and new.)
3) Unmount my recordings partition on my old backend (/var/media)
4) Drop the database on the new backend: mysql -uroot -p -e 'DROP DATABASE IF EXISTS mythconverg;'
5) Create a new database on the new backend: mysql -uroot -p < database/mc.sql
6) Reset the MySQL mythtv user's password to that configured by Mythbuntu in /etc/mythtv/mysql.txt
7) Restore the old database to the new box:- mythconverg_restore.pl
8) Change the hostname in the new database:- mythconverg_restore.pl --change_hostname --old_hostname="XXXX" --new_hostname="YYYY"
9) Mount my recordings partition on my new backend (/var/lib/mythtv)
10) Run mythtv-setup on the new backend to reset (e.g. recordings) locations, delete and recreate tuners, delete and rescan channels
11) Start mythbackend on new box
12) Re-run my grabber (shepherd) and reconfigure it.
Does this plan sound correct? Am I likely to carry over any character set problems? Anything I've missed?
Thanks in advance.
Jon
MYSQL Status on old (Gentoo) box:-
----------------------------------
jon at server ~ $ mysql -umythtv -p mythconverg -e 'status;'
Enter password:
--------------
mysql Ver 14.12 Distrib 5.0.84, for pc-linux-gnu (i686) using readline 6.0
Connection id: 1466
Current database: mythconverg
Current user: mythtv at localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.84-log Gentoo Linux mysql-5.0.84-r1
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 9 days 21 hours 4 min 17 sec
Threads: 6 Questions: 11840803 Slow queries: 0 Opens: 8498 Flush tables: 1
Open tables: 64 Queries per second avg: 13.874
--------------
MYSQL Status on new (Mythbuntu) box:-
----------------------------------
jon at media:/etc/mythtv$ mysql -umythtv -p mythconverg -e 'status;'
Enter password:
--------------
mysql Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (i486) using EditLine wrapper
Connection id: 675
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 2 days 12 hours 30 min 51 sec
Threads: 5 Questions: 1460113 Slow queries: 0 Opens: 1638 Flush tables: 1 O
pen tables: 41 Queries per second avg: 6.702
--------------
More information about the mythtv-users
mailing list