[mythtv-users] turning things over - migrate to new master backend

Bryan Frye bryanfrye at gmail.com
Wed Nov 19 13:31:37 UTC 2008


Depending on how much work you want to do on your frontends, why not change
the IP and hostname of your "old" backend and assign them to the "new"
backend.

Build your new backend from the same sources as your old so everything myth
related is pretty much identical.

Dump the database from your old backend and restore it into your new.

Copy recordings, movies, music, pics, etc...

Now, theoretically, your new backend should be a mirror of your old.  Your
frontends should be able to connect to the new backend.  If, for some
reason, they don't or the migration doesn't go as planned, you simply revert
your old backend back to the original IP and hostname and you still have a
working backend while you work out the kinks.

If you have a spare laptop or PC sitting around, you could always setup the
new backend in the same way as above, but on a new IP address/hostname and
boot a mythbuntu livecd to test with before you start reconfiguring any of
the frontends.  That way you can be sure all data is intact on the new
livecd frontend before you swap it out.  Once everything looks good, either
change the IP/hostname on the new backend or change the connection info in
the frontends.

With building a new primary backend and then migrating info over, you will
be able to use the old backend full time until you are satisfied that the
new backend has everything you need on it migrated over.  Then just adjust
the frontends connection info to point to the new backend and everything is
done.  If something goes wrong, then no harm no foul, no data is lost and
the old backend is still safe and you just troubleshoot or start over on the
new backend.

-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Michael T. Dean
Sent: Monday, November 17, 2008 8:05 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] turning things over - migrate to new master
backend

On 11/17/2008 08:01 AM, Stefan G. Weichinger wrote:
> Greets, mythtv-users,
>
> I assume that my current situation is somehow an faq, but I couldn't yet
> find fitting information and as I am very cautious to not ruin my
> current mythtv-setup I decided to simply ask once more, instead of doing
> the wrong thing(s).
>
> --
>
> Until yesterday I simply had a combined FE/BE-setup: one box with one
> DVB-S card, one SATA-disk, additional NFS4-mount in the same storage
group.
>
> Now I bought a second DVB-S-card and put it into another box in the
> basement: that box should become the new master backend in the end, with
> both DVB-S-cards and all the harddisks, while the former FE/BE should
> then run as a diskless FE.
>
> Now I wonder how to migrate my installation with the least complications.
>
> Right now I have the two backends, one master, one slave, works fine
> after some initial learning steps (how to handle storage etc).
>
> What procedure would you recommend?
>
> Migrate the backend to the new hardware by following this:
>
> http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7
>   

I'd recommend
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore .  The
scripts can do backup and restore, and support changing hostname without
using the "partial" restore described by the link above (though they do
support partial restores, too).

> ?
>
> I think it would be best to "de-myth" the current MBE step by step, at
> first set up the new MBE in the basement, maybe nfs-mounting the stored
> recordings from upstairs to the basement for a start.
>   

That would work.  Just make sure that the directory(ies) containing the
recordings are specified in the storage group(s) used to recording them
(i.e to make things easiest, just use the exact same directory
names--that's the full directory path that should be identical).

> I think it all comes down to "migrate to new hw", correct?
>
> Is the mentioned link enough?
>
> What about the changed hostname/IP of the MBE? Simply change it with
> mythtv-setup on all boxes?
>
> It's very likely that I think way too complicated here, but that's the
> reason for asking here before crashing it all up ;-)

I'd say,
1) shut down the backend on the old system
2) (assuming you're moving the MySQL database to the new hardware) do a
database backup (with the script -
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Backup_data
base_and_rotate_keeping_the_10-most-recent_backups
)
3) then restore that backup to the MySQL on the new hardware (
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Database_Re
store
and
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Full_restor
e_of_a_specific_backup_file
)
3) use the restore script to change the hostname from the old hardware's
hostname to the new hardware's hostname (
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Change_the_
hostname_of_a_MythTV_frontend_or_backend
)
4) start mythtv-setup on the new host and configure the host (you'll
likely need to do
http://www.gossamer-threads.com/lists/mythtv/users/264034#264034 --at
least the capture card part, but possibly the video source part, too, if
you're getting TV from a different source )
5) start mythbackend and verify it works
6) go to the old host and do a "DROP DATABASE mythconverg;" in mysql
then shut down mysqld
7) then "rm ~/.mythtv/{config.xml,mysql.txt}" (all of that in the quotes
will work from the shell exactly as is--just no quotes)
8) start mythtv-setup and configure the old host (now a "new" MythTV system)
9) configure frontends as desired and enjoy

Mike

_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list