Experimental

This is experimental, you must test and confirm that this is working in your Proxmox environment. Changes to Proxmox may prevent it working as expected.

Prerequisite

This tutorial assumes that you have already setup backup on 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.

With some changes, Proxmox can be made to backup to ObjSpace.

Configuring Promox for ObjSpace backup

StepActionCommandDescription
1Install Python Developmentapt-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.
2Install s3cmdpip install s3cmds3cmd is required to copy files to ObjSpace
3Configure s3cmds3cmd --configure

Access Key: (Your access key from the welcome email)
Secret Key: (Your secret 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)
Path to GPG program: (leave as default)

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'

4Change the configuration for ObjSpacesed -i "s/s3.amazonaws.com/obj.space/g" /root/.s3cfg 
5Test s3cmd

s3cmd ls

You should see a list of buckets
6Create a bucket for backups

s3cmd mb s3://mybackup-server123

You should see confirmation that the bucket is created.
7Update 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
8Download the ObjSpace scriptwget -O /var/lib/pve-manager/vzdump-objspace.pl https://delimiter.obj.space/proxmox/vzdump-objspace.pl 
9Set executable permissionschmod a+x /var/lib/pve-manager/vzdump-objspace.pl 
10Fix the bucket namesed -i "s/##BUCKETNAME##/YOURBUCKETNAME/" /var/lib/pve-manager/vzdump-objspace.plChange YOURBUCKETNAME to the bucket name you created in step 6

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'.

Then using your S3 tool, download the VM tarball, verify that it is complete. You can verify the checksum of the downloaded file from ObjSpace versus the checksum of the original backup file on your Proxmox server.


Your Rating: Results: PatheticBadOKGoodOutstanding! 126 rates