I want to use
dd to backup the disk of an OpenVZ VPS in addition to traditional cold tar backups. Because I may need to migrate to a different VPS provider.
From end user point of view, OpenVZ containers are folders on the host (similar to LXC). If I am not wrong, OpenVZ uses common file system so containers (virtual environments) are just directories (isolated by chroot).
Within the container,
/ uses a block device called
/dev/simfs, I wonder if I can use dd to backup the whole disk image over SSH.
Technically I don't see any problem, but I haven't done it myself, just not 100% sure and confident. I have done the same thing for Xen and VMware VMs, it worked fine.
ssh root@vps "dd if=/dev/xvda " | dd of=~/backup/xen.img
Does it work for OpenVZ, anyone has tried this before?
ssh root@vps "dd if=/dev/simfs" | dd of=~/backup/openvz.img