Is it possible to restore a cloned drive in a VM?

skeptical

New Member
May 22, 2024
10
2
3
Australia
I want to clone my current SSD (Ubuntu) to an external HDD, then install Proxmox on the SSD, then create a VM in Proxmox with the cloned drive transferring the clone to the VM. Is this possible with Proxmox? I'm new to Proxmox, still learning.
 
Put BKPDEST.mrg in /root/bin/boojum (in the VM) and chmod +x it, define your backup target to be separate non-root disk or NAS

apt-get install -y fsarchiver

Run the bkpsys-2fsarchive script (after putting it in /root/bin and chmod +x it)


To restore, boot systemrescuecd on the target instance:

https://github.com/nchevsky/systemrescue-zfs/releases

scp the RESTORE-fsarchive-root.sh to /tmp on the systemrescuecd root filesystem, and chmod +x it

fdisk the target disk and make 2 partitions, 1 for swap and 1 for the rootfs restore

mkswap /dev/sda1 # substitute whatever disk/partition you want for swap, the restore script should detect and use it

EDIT the RESTORE-fsarchive-root.sh script and change the TODO line for what partition you want to restore to
^ This is important!

Use sshfs per the comments in the script to mount the remote directory that contains the .fsa backup file (or samba / nfs, whatever works for you)

cd to the directory that has the .fsa backup file, Run /tmp/RESTORE-fsarchive-root.sh *.fsa # put the .fsa filename here, exact command as shown will work if there is only one; rootfs will be restored to the partition you defined in the script and it should be made bootable for you.

If it doesn't boot, have a copy of super grub disc and rescatux ready to go; once you are able to boot into the restore, you can reinstall grub.

https://distrowatch.com/table.php?distribution=supergrub

https://www.supergrubdisk.org/rescatux/

DO THIS AT YOUR OWN RISK, I take no responsibility for data loss. Test a restore to a VM first to familiarize yourself with the procedure.

There are additional steps involved if the VM is EFI bootable, not getting into that right now. This should work fine for non-GPT BIOS boot.

Veeam is a bit more straightforward, but I've done dozens of P2V, V2P, etc with fsarchiver and I know it works.

https://github.com/kneutron/ansitest/blob/master/VIRTBOX/0HOWTO-bare-metal-restore-linux-root.txt
 
Last edited:
  • Like
Reactions: skeptical
Put BKPDEST.mrg in /root/bin/boojum (in the VM) and chmod +x it, define your backup target to be separate non-root disk or NAS

apt-get install -y fsarchiver

Run the bkpsys-2fsarchive script (after putting it in /root/bin and chmod +x it)


To restore, boot systemrescuecd on the target instance:

https://github.com/nchevsky/systemrescue-zfs/releases

scp the RESTORE-fsarchive-root.sh to /tmp on the systemrescuecd root filesystem, and chmod +x it

fdisk the target disk and make 2 partitions, 1 for swap and 1 for the rootfs restore

mkswap /dev/sda1 # substitute whatever disk/partition you want for swap, the restore script should detect and use it

EDIT the RESTORE-fsarchive-root.sh script and change the TODO line for what partition you want to restore to
^ This is important!

Use sshfs per the comments in the script to mount the remote directory that contains the .fsa backup file (or samba / nfs, whatever works for you)

cd to the directory that has the .fsa backup file, Run /tmp/RESTORE-fsarchive-root.sh *.fsa # put the .fsa filename here, exact command as shown will work if there is only one; rootfs will be restored to the partition you defined in the script and it should be made bootable for you.

If it doesn't boot, have a copy of super grub disc and rescatux ready to go; once you are able to boot into the restore, you can reinstall grub.

https://distrowatch.com/table.php?distribution=supergrub

https://www.supergrubdisk.org/rescatux/

DO THIS AT YOUR OWN RISK, I take no responsibility for data loss. Test a restore to a VM first to familiarize yourself with the procedure.

There are additional steps involved if the VM is EFI bootable, not getting into that right now. This should work fine for non-GPT BIOS boot.

Veeam is a bit more straightforward, but I've done dozens of P2V, V2P, etc with fsarchiver and I know it works.

https://github.com/kneutron/ansitest/blob/master/VIRTBOX/0HOWTO-bare-metal-restore-linux-root.txt
Thanks for taking the time to reply, really appreciate it.
 
  • Like
Reactions: Kingneutron

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!