[Off Topic] Any idea how to clone a live cloud server for on premise setup?

Discussion in 'ISPConfig 3 Priority Support' started by pvanthony, Mar 7, 2023.

Tags:
  1. pvanthony

    pvanthony Active Member HowtoForge Supporter

    I have a Debian 10 server on the cloud. i would like to make a clone and run it on my desktop using kvm.
    Any solutions out there that can do the cloning with the resultant image file can be started using kvm?
    Any advice would be good?
    Tried seaching in google but not getting any good solution.
    Previously there was a tool called mondo rescue but it has not been updated to support Debian 10.
    http://mondorescue.org/downloads.shtml
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

  3. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Thank you for this link. I will check it out.
     
  4. pvanthony

    pvanthony Active Member HowtoForge Supporter

    Finally did it.
    This is the method used.
    using virt-manager created a volume.
    mounted the volume in a virtual machine.
    used parted and partition it like the one in the cloud machine.
    used rsync to copy the cloud machine to the volume.
    chroot into the volume and did a grub-install.
    Then removed the volume and booted up the volume in kvm.
    Guess what? It actually worked. Yahoooo.
    Here is the rsync used.
    ----------- start -----------------
    usr/bin/rsync -aHv --progress --numeric-ids --del -e "ssh -2 -C -p <port-number> -i /.ssh/<keyfile>" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found""} /* root@<hostname>:/<dir_to_save_into>/
    ------------ end ----------------
    Hope this is helpful for others.
     

Share This Page