This is a draft of my installation process which is mainly based from this blog: Efficient Xen Backups Using LVM and Rsnapshot.
Our setup is on Debian 6 server with 2TB disk running 10 vpses. We followed the above guide with notes on errors we encountered, mostly rsnapshot related. We are keeping daily backup locally, on a separate partition, and copies them to our remote server every week.
The Setup (mostly defaults): vg path is /dev vg name is vg0
Setup Process:
Create logical partition to store backups locally. Size is 100GB and named it backups. Format it with ext3 and mounted it to /backups.
1 2 3 4 |
|
Install and configure rsnapshot. Make sure you use TAB correctly as it will complain or give you an error if you don’t.
1 2 |
|
Here’s my rsnapshot config changes and/or additions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Schedule daily backup task in crontab (/etc/crontab). Note that rsnapshot is in /usr/bin/rsnapshot on Debian.
1
|
|
You can then run the rsnapshot task to make sure everything is working, from your config file to creating and mounting lvm snapshots. Execution time depends on number of vms and their size. You can ran them individually if needed.
1
|
|
Then I setup another backup task from remote backup server to pick up our local backups at /backups. You can also configure rsnapshot to backup your snapshots directly to your remote backup location (usiang rsync/ssh), depends on how you want to backup your data.