Backing up via rsync -- Does it work? [message #43122] |
Sun, 24 July 2011 16:50 |
optize
Messages: 33 Registered: September 2006
|
Member |
|
|
I run:
/usr/bin/rsync --delete --rsync-path="nice rsync" -vaz /vz /backup
Which backs up /vz to /backup every night. It seems to work as designed, however I'm not confident that's the best way to be backing up a VPS node.
Other options could be:
- R1Soft, which is insanely expensive and works half ass.
- vzdump, which takes full dumps, afaik and would waste a lot of CPU when it's not really needed.
My concerns with rsync is that it has issues with socket files, /dev, etc. I'm concerned that if I ever have to restore my rsync copy, these VPS's wont start up due to missing system files.
Has anyone had any success stories with rsync with both backing up and restoring without issues? I'm all ears.
|
|
|
|
Re: Backing up via rsync -- Does it work? [message #43126 is a reply to message #43122] |
Mon, 25 July 2011 10:58 |
TheStig
Messages: 94 Registered: December 2008
|
Member |
|
|
I've copied containers using rsync before, loosly basing my actions on this wiki, http://wiki.openvz.org/Physical_to_container, as the process is quite similar for containers. I've always excluded /dev /proc/ /sys. I recreated dev and sys by copying the files from a precreated image of the same distribution and it worked.
i have to admit, those machines are not what i would call very stable, but it works more or less.
ps: rethinking the whole thing again - u should be able to use /dev and /sys from your backup!
[Updated on: Mon, 25 July 2011 11:00] Report message to a moderator
|
|
|
|
Re: Backing up via rsync -- Does it work? [message #44697 is a reply to message #43122] |
Thu, 22 December 2011 16:45 |
votsalo
Messages: 26 Registered: December 2011 Location: Greece
|
Junior Member |
|
|
I believe rsync has no problem with dev files.
I use rsync -a -v to backup my non-openvz OS
I have tried a successful restore (when I regretted an OS upgrade).
I have also cloned my OS to another partition this way. I just had to edit fstab and change the UUIDs to the new filesystems.
However, I do the backup/restore while the OS is not running, because I'm worried about data inconsistencies. I boot to another OS, backup my main OS, and then reboot the main OS. Consequently I don't do these OS backups very often. I do them before I make any major changes (such as upgrading the OS). I backup my working files with rsync daily, without rebooting.
I don't know if the same applies to openvz, since it may have more exotic special files, directory hard links, etc.
|
|
|