Hello! I have a machine running multiple containers. Some are big, having a lot of files. How can I do a network backup, and what is the recommended method? I have a backup server with enough space. But there isn't enough space on the HN to backup locally and then move the files to the backup server. I used vzdump when I had enough space, but now I can't anymore. And on the big containers it also takes a lot of time. I do backups daily, so I think that a synchronization would be prefered instead of a complete backup. Please provide me with some information on how to do these backups. I want complete container backup, with easy restoration (vzdump is perfect). Thank you very much!
Nobody can help? I was thinking of making vzdumps over sshfs, but it gives errors on making mknods and symlinks. How do you do backups on remote locations?
Why dont you use LVM snapshots and rsync? It works like a charm without the need of much space (actually only the space requiered to write down the filesystemchanges during backup, so often 100mb is enough). Give it a try, you'll love it.
I'm working on rsync-ing directly to the backup server. I don't mind I have to suspend the machine for a few seconds. Does anybody have a rsync script available?
you can use backupninja or tons of script available on the net I would recommend you write a loader, listfile and a backupscript yourself. Loader is the one you call through cron once a day or so: #!/bin/bash source /root/backuplist >> /varlog/backuplog exit 0 The list /root/backuplist is the file where you echo every VPS in. You can do that with (example VEID 1102): # echo "/root/backup.sh 1102" >> /root/backuplist Then the backup.sh file itself: #!/bin/bash backupserverip=77.77.77.77 vzctl stop $1 rsync /var/lib/vz/private/$1 backup@${backupserverip} vzctl start $1 exit 0 You should look at the details of this pseudo script. My system mayb different. I encourage you to fix your problem this way. A good sysadmin has to know how this works. adding to cron can be done with # crontab -e good luck
I've already done the script, it is more complicated than this one. It uses arrays for the containers and all the settings are configurable. I was just asking for scripts to view how others do it, especially to see what rsync options are used. I checked the vzdump script, and took the rsync options from there. By the way, the rsync must be done twice, once with the machine running, then the machine is suspended (and not stopped), rsynced again and unsuspended. Thanks for your kindness!