I wanted to backup my omv-extras repo machine while it was running. I was able to back it up and restore to a VM with no problems. So, I tried this with an OMV VM and it works as well. I thought I would post this here first before moving it to the forum. I don't think it needs to be a plugin but I thought it might be handy
Backup - (don't mount the backup drive using web interface unless it will be there when you restore)
Code
apt-get clean
mkdir /media/backup
mount /dev/sdX1 /media/backup
rsync -aAXv /* /media/backup/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/export,/home/ftp}
dd if=/dev/sda of=/media/backup/grub.dd bs=446 count=1
dd if=/dev/sda of=/media/backup/grub_parts.dd bs=512 count=1
blkid > /media/backup/uuids
umount /media/backup
Restore (please ask for help in a new thread for restoring - not easy!)
Code
boot SystemRescueCD
assume sda is new drive, sdb is drive to restore from
mount /dev/sdb1 /mnt/backup
if new drive is same size or larger
dd if=/mnt/backup/grub_parts.dd of=/dev/sda bs=512 count=1
else
dd if=/mnt/backup/grub.dd of=/dev/sda bs=446 count=1
fdisk /dev/sda
create main partition and swap partition
mkswap /dev/sdaX
end if
mkfs.ext4 /dev/sda1
cat /mnt/backup/uuids
tune2fs /dev/sda1 -U uuid_from_above
mount /dev/sda1 /mnt/gentoo
rsync -aAXv /mnt/backup/* /mnt/gentoo/ --exclude=/lost+found
nano /mnt/gentoo/etc/udev/rules.d/70-persistent-net.rules
remove entire eth0 line
umount /mnt/gentoo /mnt/backup
reboot
boot Debian Squeeze install cd and select Rescue Mode from Advanced options
Reinstall grub boot loader on /dev/sda or the following command from shell
grub-install /dev/sda
Display More