...
| Info | ||
|---|---|---|
| ||
This tutorial assumes that you have already setup backup setup and working on the Proxmox server already. |
Proxmox is a popular virtualisation control panel for OpenVZ, KVM and LXC virtual machines. Proxmox includes a backup system but by default only backs up to the a local directory on the same system.
...
| Step | Action | Command | Description | |
|---|---|---|---|---|
| 1 | Install Python Development | apt-get update apt-get -y install python-dev python-pip | You need to install pip to get the latest version of s3cmd installed. The default s3cmd available in the Debian repository is broken. | |
| 2 | Install s3cmd | pip install s3cmd | s3cmd is required to copy files to ObjSpace | |
| 3 | Configure s3cmd | s3cmd --configure | Access Key: (Your access key from the welcome email) Encryption password: (if you want to encrypt then enter your password, remember you will need this password to decrypt the files when you come to restore) Use HTTPS protocol [No]: yes (Enter yes as we want https) Test access with supplied credentials? [Y/n]: n (We do not want to test at this point, we still need to edit the configuration file) Save settings? [y/N]: Y (Enter Y to save the file) Configuration saved to '/root/.s3cfg' | |
| 4 | Change the configuration for ObjSpace | sed -i "s/s3.amazonaws.com/obj.space/g" /root/.s3cfg | ||
| 5 | Test s3cmd | s3cmd ls | You should see a list of buckets | |
| 6 | Create a bucket for backups | s3cmd mb s3://mybackup-server123 | You should see confirmation that the bucket is created. | |
| 7 | Update the vzdump configuration | echo "script: /var/lib/pve-manager/vzdump-objspace.pl" >> /etc/vzdump.conf | Set vzdump to call the ObjSpace script during the vzdump execution | |
| 8 | Download the ObjSpace script | wget -O /var/lib/pve-manager/vzdump-objspace.pl https://delimiter.obj.space/proxmox/vzdump-objspace.pl | ||
| 9 | Set executable permissions | chmod a+x /var/lib/pve-manager/vzdump-objspace.pl | ||
| 10 | Fix the bucket name | sed -i "s/##BUCKETNAME##/YOURBUCKETNAME/" /var/lib/pve-manager/vzdump-objspace.pl | Change YOURBUCKETNAME to the bucket name you created in step 56 | |
Testing backup
From the Proxmox web interface, attempt to backup one of your VMs and monitor the 'Task Viewer: Backup' as it backups the VM and copies the tarball to ObjSpace. You want to watch for 'Successfully copied to ObjSpace'.
...