[mythtv-users] Please help me move my backend to new host/hardware.

Ram Ramesh rramesh2400 at gmail.com
Fri Mar 24 15:26:07 UTC 2023


All,

  I have a mythtv setup with one backend and several frontends. The 
backend machine also runs a frontend to test any issues locally. They 
all run some version of debian with mythtv packages installed over 
standard release. Currently they all are on debian bullseye with 
possibily running more recent kernels due to the need to support more 
modern processors. My tuners are HDhomerun networked on the same subnet. 
There are two - one 2-tuner and another 4-tuner with static IP 
assignment from my  home DHCP server. My current backend is also on a 
static IP assignment. Other frontends are on dynamic assignment.

   However, my backend is old (10+ years) and in need of HW upgrade. 
Towards this, I have built a new machine with intel z690 MB and a core 
i3-13100. I installed debian testing and ran a complete check to make 
sure key hardware components work as expected. I also checked kernel 
5.19 supports all that care about in my new machine. I am at a point to 
move my backend SW setup to this machine. To support this I have a new 
and unused partition of correct size in the new machine's disk. Both 
current and new hardware use UEFI boot and I do not have any legacy BIOS 
boot in any of my home machines.

  My plan is to make image copy of the current installation, restore on 
the partition created for this purpose and set it up.
Let us call the test installation (debian testing to check the hardware) 
as _new-base_ and backend image copy restored on new hardware as 
_new-backend_. We will use _current-backend_ to refer to the system that 
is currently running and serving from the older hardware that I want to 
replace.  I plan to proceed this way and please let me know if I am 
making any mistakes. (These steps are inspired by this: 
https://www.mythtv.org/wiki/Backend_migration)

 1. Shut down all frontends
 2. On the current-backend, make a fresh db backup and disable backend
    service (systemctl disable mythtv-backend)
 3. Reboot current-backend machine using some rescue boot usb and make
    image copy of the current install on to a spare disk. Shutdown the
    backend machine completely and do not boot it at all again.
 4. Boot new-backend hardware, bootup new-base installation, image
    restore backend on to its designated partition
 5. Fsck this restore to make sure everything is ok, mount it, fix
    fstab, hostname and few other essential items in the restore image.
    Also make sure using symlinks storage directories now point to local
    disk.
 6. Run update-grub on new-base install so that new-backend image
    becomes a choice up on grub prompt on a reboot.
 7. Reboot the image copy (new-backend) update-grub and update-initramfs
    -u and reboot back into new-backend
 8. Since backend.service was disabled before image copy, note backend
    is running yet. Run mythtv-setup and fix master-backend name and IP
    and any  other essential items.
 9. Transfer storage drives from current-backend machine to new-backend
    drive and make sure symlinks made in step 5 are adjusted to point to
    correct directories.
10. After double checking, enable backend-service and start it. Go to a
    nonfrontend host, pull up mythweb and check that you can
    connect/view the status on the new-backend. Ensure all tuners are
    visible and you can see the listing.
11. Add a recording to see if things work as expected.
12. Start the frontend on new-backend machine enter setup and point it
    to new-backend. Watch live-tv and pull up the new recording made to
    check everything is ok
13. Review status of backend recordings/rules etc to make sure
    everything is in order.
14. Boot up other frontends and point to the new-backend and test it.
15. Wait a week for this new setup to work as expected and then
    permanently wipe the current-backend install so that it can never be
    booted to cause any confusion.

Please let me know if I missed any step.

Since I used UUID for all mounting (or partition reference), I chose 
image copy/restore instead of tar to create and restore the 
installation. Let me know if you think that is a bad choice also.

Regards
Ramesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230324/7ac944a4/attachment.htm>


More information about the mythtv-users mailing list