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

Ram Ramesh rramesh2400 at gmail.com
Fri Mar 24 17:22:18 UTC 2023


On 3/24/23 12:01, Stephen Worthington wrote:

Stephen, thanks for taking the time.
>
> Make sure the new system has the correct packages installed for the
> filesystem you are using on your recording drives, if it is not ext4.
> I always manage to forget to install JFS on my new systems.
As I am making image copy of the entire install from old machine. 
Everything should be in there. I am not creating a new install from 
scratch. I am simply restoring image which should have everything and as 
long as the old system is capable of using new hardware I should be good 
to go. I will simply move the storage disks across to the new machine. 
So, recordings and videos do not change at all except that they are part 
of new machine after the switch.
>
>> 1. Shut down all frontends
>> 2. On the current-backend, make a fresh db backup and disable backend
>>     service (systemctl disable mythtv-backend)
> Shut down and disable mythbackend before making the database backup:
>
> systemctl --now disable mythtv-backend

Thanks for specifying the order. Yes, I will do the backup after 
disabling 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.
> If you have enough space on one of your recording drives, just use a
> bootable clonezilla image to create the boot drive image on one of
> them.  Then move that drive to the new PC and boot clonezilla there
> and restore the image.  Clonezilla normally copies the UUID values of
> the original partitions - other backup software often will be
> "helpful" and give you new UUIDs.
>
> Clonezilla can also do image backups over your network to other
> systems, but that is rather slower than doing it directly to a drive.
>
> If the new system partition is larger than the old one, I am not sure
> if clonezilla has an option to expand the system image to fill the new
> partition when it does the restore.  If it does not, just run gparted
> and do that.  Make sure the new system partition is not exactly the
> same size as the old one, as that usually means the restore will fail
> because the partition is too small, due to the change in size of
> blocks and disk layout.  If you want close to the same size, just make
> it a little bit bigger than the old one.
I simply create partitions of exact same size and dd the old partition 
on to new drive/partition. It is byte-by-byte identical to the original 
on a different disk. So, the only difference will be partition number 
and disk (hardware) id. I do not use either of these anywhere in the 
system files. I always use UUID and not /dev/xxx naming.
> If the new backend has a different hostname, then run
> mythconverg_restore.pl with its option to change the hostname in the
> database.
If I do an image copy to create new install. So,  do I have do a 
restore? I can, but do I have to? I still have to fix hostname and IP in 
the database which I intend to do before enabling backend.
> If you have not met it yet, the best way to make bootable images on
> USB sticks is to use Ventoy, which allows you to have many different
> bootable images on one USB:
>
> https://ventoy.net
>
> Once you have Ventoy installed, all you have to do to add a new Linux
> image is to copy the live image .iso file onto the USB.  I always have
> copies of the live images of my distros, a clonezilla image and my
> current Windows install image on my Ventoy USB.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums:https://forum.mythtv.org

I kind of missed out one detail in my message intentionally. I always 
have a bare minimal second install in every machine to boot as a backup. 
My current-backend also has one also (xubuntu 20.04). I simply boot into 
it and make a dd copy of the mythtv-install disk partition (debian 
bullseye). So, the whole system is copied while it is not running at 
all. It should preserve every bit of state including host name and last 
IP address. After image restore, I usually fix that part and the 
new-image should be usable, I think.

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


More information about the mythtv-users mailing list