Migration of OMD site to new VM

Hi forum
i have a question regarding migration a complete site to a new VM.
One VM, three sites on it, distributed setup. Since the VM is now on the edge concerning ressorces (22k Hosts, 160k services, 24 vCPUs, 128GB RAM), i want to migrate the two slave sites to separate VMs for better load and scalability.
Since RRD are the biggest directories i came up with rsync.
I.e. create site with new name, copy files incremental serveral times, change IP for distributed setup in webinterface and go.
My question is: must the user and group id (i.e. the ones to be found in /etc/passwd and /etc/group) on the newly created VMs be the same? Or does it only have to be the same user/group name. Because changing the IDs on the new VMs afterwards (after creating site with same name) to the same IDs which tey have on the source machine makes OMD unusable.

Maybe someone has a best practice for me?


This is a question of your operating system. Normally the user are just stored with the id in your file system. For this case your user ids have to be the same on both systems.

To overcome the problem you can use the omd backup and restore mechanism to copy your sides from one server to another. As for my landscape of around 200GB of site data the speed of rsync and this methode are nearly the same:



Hi tosch
thank you for your quick reply. I use Ubuntu 18.04 on all machines.
The command omd backup mysite - | ssh user@otherserver “cat > /var/backup/mysite.tar.gz” does the trick but since i have to copy around 400GB this taskes forever. Thats why i thought of rsync.
Or maybe the above command once plus restore and then rsync without copying the user-ids maybe?


With piping through the servers you can directly backup and restore to the new instance ssh mysite@checkmkserver "omd backup -" | omd restore -. This works also with online instance on the origin site. You definitifly shouldn’t make any changes to the origin site in the time of transfer. All RRDs are savely copied and consistent after this procedure.
In theory you can use this methode to copy your whole installation without RRDs ssh mysite@checkmkserver "omd backup --no-rrds -" | omd restore - and copy the RRDs before with rsync and just the difference at your downtime point. There should be an option to rsync to change uid/gid during copy.
I never tried this mixture of both methods but there is nothing in my mind which should argue against this method.

The handy point to this method is that you can test it several times without shutting down your production site. But keep in mind, the transfer of data surely can influence the performance of the production site.


omd backup/restore is one way.

SInce you are talking about VM’s, you could just clone the VM; destroy the site being migrated from the original VM, and all other sites on the copy.

Repeat for the other site.

1 Like

Yeah this is what i am doing now.
Copying 400GB of RRD files takes forever, cloning of a VM only 2 minutes, i think with changing machnine host name & id & stuff i’ll be at 20-30minutes per VM.