Skip to content

How to clone running CentOS machine

Last updated on March 13, 2019

You have 2 CentOS machines. 1st is some important server with data and running services, 2nd is CLEAR CentOS.
To make clone process more efficient and do not loose any data it is recommended to stop all the important running services (mysql, apache, etc…) on source machine

  1. Install rsync on both source and target machines
    yum install rsync
  2. Backup and overwrite these files on destination server:
  3. Start the operation with Rsync from the source machine to the destination machine
    rsync -av —exclude='/proc' —exclude='/sys' / ip.destination.machine:/
  4. After process is finished check backup files from step 2. Edit boot device if needed, change UUID in /etc/fstab and restore if needed
  5. Reboot destination machine
  6. If you are getting “Dracut error” after reboot then reboot to rescue mode and execute
    dracut -f
  7. Wait while process is finished, reboot again. Done
Published inLinuxShell