<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    All,<br>
    <br>
     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. <br>
    <br>
      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. <br>
    <br>
     My plan is to make image copy of the current installation, restore
    on the partition created for this purpose and set it up.<br>
    Let us call the test installation (debian testing to check the
    hardware) as <u>new-base</u> and backend image copy restored on new
    hardware as <u>new-backend</u>. We will use <u>current-backend</u>
    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: <a class="moz-txt-link-freetext" href="https://www.mythtv.org/wiki/Backend_migration">https://www.mythtv.org/wiki/Backend_migration</a>)<br>
    <ol>
      <li>Shut down all frontends</li>
      <li>On the current-backend, make a fresh db backup and disable
        backend service (systemctl disable mythtv-backend)</li>
      <li>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. </li>
      <li>Boot new-backend hardware, bootup new-base installation, image
        restore backend on to its designated partition</li>
      <li>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.<br>
      </li>
      <li>Run update-grub on new-base install so that new-backend image
        becomes a choice up on grub prompt on a reboot. <br>
      </li>
      <li>Reboot the image copy (new-backend) update-grub and
        update-initramfs -u and reboot back into new-backend </li>
      <li>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.</li>
      <li>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.<br>
      </li>
      <li>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. </li>
      <li>Add a recording to see if things work as expected. </li>
      <li>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</li>
      <li>Review status of backend recordings/rules etc to make sure
        everything is in order.</li>
      <li>Boot up other frontends and point to the new-backend and test
        it.</li>
      <li>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. </li>
    </ol>
    Please let me know if I missed any step. <br>
    <br>
    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. <br>
    <br>
    Regards<br>
    Ramesh<br>
    <br>
    <br>
  </body>
</html>