How to backup your Linux VPS and run it in virtualbox
How to backup your Linux VPS and run it in virtualbox
Personally i found a easy way to backup your linux Debian VPS.
1.Execute ssh dd comand from your linux pc.
where x.x.x.x is your ip address.
2.Crate Virtual Machine vps with virtual drive 30GB (30GB is cos we need to make sure we have enough space )
3.Mount new virtual box hdd vps.vdi
4. Extract and restore your backup /home/user/vps.gz (extract vps.gz to --> vps.img)
or
5.Run your virtual box VM and enjoy your cloned vps!
1.Execute ssh dd comand from your linux pc.
Code: Select all
ssh root@x.x.x.x "dd if=/dev/sda | gzip -c --fast" | dd of=/home/user/vps.img.gz
2.Crate Virtual Machine vps with virtual drive 30GB (30GB is cos we need to make sure we have enough space )
3.Mount new virtual box hdd vps.vdi
Code: Select all
modprobe nbd max_part=16
Code: Select all
qemu-nbd -c /dev/nbd0 /home/xxx/VirtualBox\ VMs/vpn/vps.vdi
Code: Select all
dd if=/home/xxx/vps.img of=/dev/nbd0 bs=4M
Code: Select all
gunzip -c vps.img.gz | sudo dd of=/dev/nbd0
5.Run your virtual box VM and enjoy your cloned vps!