How To Install Offsite Proxmox Backup Server On AWS Cloud

final feature image-install proxmox on aws EC2

A client of mine uses ERP Software, which is critical to their organization, The software runs in a VM in Proxmox HA Cluster (High Availability), but due to frequent power outages and sub-standard airconditioning and hardware failures, the client asked us to build them an offsite backup solution to recover data in case the local site fails, as a result, we used Proxmox backup server and install it on AWS Cloud EC2 VM instance.

Offsite Backup Server Installation summary steps

Here is a little disclaimer before you read the rest of it , there are two components of this recepie, first a proxmox backup server (free pbs) second a proxmox virtual environment server (free pve ) that is running your vms in your organization or home.

Now, let’s start with the summary steps, we will install the Proxmox backup server, which is free, open-source, and robust software on top of an AWS EC2 VM having Debian Linux Installed. Thus the AWS cloud shall host our offsite backup server and will store backups of our critical VMS on it. The AWS charges depend on the size of your backed up VMS but at minimum, it will charge $20 a month. It is advised to configure your cloud storage accordingly as you be will charge for this storage.

After adding storage to our Proxmox Backup Server VM, we will open port 8007 in the cloud firewall so that the backup server’s web interface can be accessed. After this, we will get ssh access to our VM and copy-paste a few Linux commands which will finalize our Proxmox backup server installation. Once our backup server is ready we will add it to our on-premise Proxmox free Hypervisor server ( also called proxmox pve) and then schedule automated periodic backups for our critical VMS.

Creating a Debian based VM instance on AWS

Time to get our hands dirty, assuming that you have a credit/debit card and already owned or have readily created an AWS account then once you log in to your account you will reach AWS Management Console.

Now from the AWS Management Console search for EC2 which will then take you to the following page.

ec2 dashboard page : install proxmox backup server on aws

Then on this page choose your nearest location and then select launch Instance which will take you to the official AWS images page and there you will then search the keyword Debian and then select Debian 10 (HVM), SSD Volume Type – ami-08ca9d63b8d4ec276 (64-bit x86) / ami-0230b2fe0f1eb96a3 (64-bit Arm) or better.

if you have just a couple of VMS to backup then just select t3.small (2 vcpus, 2Gb Ram), and if you have bigger resources to backup then choose t3.medium (2 vcpus, 4 GB Ram), and after this click Next.

On Configure Instance Details page there is no need to change or tune any settings unless desired so just click Next. Now it’s time to add storage to your instance so click Add New Volume, for volume settings I will go with default volume type settings. Choose the desired size let it be 100 or 1500 Gigs are up to you, and be cautious not to go for overkill because you will be charged for storage.

I will not recommend adding multiple storages to create a mirror/raid because you would be adding just virtual storage (Not Physical Storage ) which is provided by AWS hypervisor so what’s the use of multiple virtual storages from the same physical AWS server machine, while all storage will fail if the underlying physical AWS physical machine fails but that’s my opinion.

Anyways after adding storage click Next Add Tags -> click Security Group. On this page click Add Rule and for the Type choose Custom TCP Rule, Protocol -> TCP, Port Range ->8007 then Source->Custom -> 0.0.0.0/0, and for Description->pbs-webinterface. This will create an allow rule in the AWS firewall for the PBS web interface and the rest leave at default. Once done click Review and Launch to review your VM settings if anything is missed just revisit the desired page and re-add it once done click the launch button.

After this, you will be asked to either create a key pair or choose an existing pair, if you have other VMS then you may choose existing ones, and if not then choose to create a new pair and name it “pbs” as in relation to Proxmox Backup Server and after this select the Download Key Pair button to download the pbs. pem file on your machine.

After this just select the Launch button which will turn on your Debian Linux VM Instance. It takes about a minute for instance to be in the running mode.

Now go back to EC2 Dashboard and Select your Instance and then from the top menu select Connect and then you will see the following page

ssh connect to proxmox vm instance.

To connect to your VM instance you need to follow this easy guide from AWS.

Assuming that all went well up to this point and you are able to access your VM through ssh then it’s time to copy and paste a few Linux commands which will install proxmox backup server on your VM instance.

You can copy and paste all in one go into your instance ssh terminal and let the magic begin.

I have added a small description of these commands separately otherwise you will have to copy and paste them one by one.

IMP { you will be prompted for different things during installation, just hitting enter will do the job but do select the right harddisk to install backup server when prompted}

sudo su 

apt-get install wget -y

wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
sha512sum /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg


echo deb http://ftp.debian.org/debian bullseye main contrib >> /etc/apt/sources.list
echo deb http://ftp.debian.org/debian bullseye-updates main contrib >> /etc/apt/sources.list


echo deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription >> /etc/apt/sources.list


echo deb http://security.debian.org/debian-security bullseye-security main contrib >> /etc/apt/sources.list

apt-get update -y

apt install proxmox-backup ifupdown -y

apt dist-upgrade -y

Once you are done copy, pasting, and with installation then be sure to run this command again apt dist-upgrade -y because mostly when you are copy-pasting the last command is not executed or pasted, so make sure you run it so that you can have the latest version of proxmox backup server.

Proxmox Installation on Debian, command’s description

if you are already a Linux user then you may skip and if not then just take a note of few commands.

sudo su ### gives you root privilege to install the software.

apt install wget ### command to install the wget utility

wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg ### allow you to install the security key to get access to the bullseye release/version of the proxmox backup server.

Next, all the echo commands copy the HTTP://sources to the /etc/apt/sources.list, adding these echo commands will do two things 1st it will allow you to install proxmox backup server, and the 2and It will allow you to have beta updates and then also allow you to upgrade to new distribution.

apt-get update -y #### updates your repositories database with proxmox sources.

apt install proxmox-backup ifupdown -y #### It is obvious from the command that it installs proxmox backup server but there is a small additional information that related to “ifupdown”, This a program used by the AWS to manage your VM network configuration, and by default, the proxmox backup server installs ifupdown version 2, as a result, the installation hangs and become inaccessible as AWS will not allow it. So the following command “apt install proxmox-backup ifupdown” instructs the installer to install the proxmox backup server while keeping the ifupdown program installed.

apt dist-upgrade -y ### updates your present distribution to the latest available distribution.

Last step in Installing Proxmox Backup Server

if everything goes smoothly then you should test your installation with the following command.

/sbin/modprobe zfs and hit enter . If you see no errors then great your installation is a success.

The last step to wind up the installation phase is to add a password, By default, Proxmox Backup Server uses the root as a username so we need to create a password for the root.

passwd root
# Then a new passwd will be asked, so enter new passwd and then confirm it. 
#then make sure you reboot.
reboot

After reboot, it’s time to access your backup server web interface. Head back to ec2-dashboard->instances then scroll horizontally to the point where you see the Public IP Address attached to your instance, copy this IP address and use it like this on your web browser.

https://your-instance-public-IP-Address:8007

After hitting enter you should see an SSL warning that the site/connection is not secure and when you proceed you should see the following page.

proxmox backup server login page

Now just login with username root and your password and enter the PROXMOX BACKUP SERVER dashboard page .

fresh install proxmox backup server on aws web interface

Create Datastore on Proxmox Backup Server

The Datastore act as shared storage that is made accessible to our remote/on-premise VMS running on PVE (let’s call it our proxmox virtualization server), as in the previous step we have added an additional storage to our PBS (Proxmox Backup Server), so now its time to use it, so from the left pane select Storage/Disks->ZFS->Create ZFS you will see the following Popup.

creating aws proxmox backup server datastore.

you can have the same settings as I have but your disk size may be different. Now keep the HDD selected, and set compression to ztsd (Compression good and Fast), and name your data store, I have named mine as “vmbkps1” as in vmbkpserver-1, and after this select ok and then your datastore will be created, and will show under Datastore.

proxmox zfs datastore created over aws cloud

A Static Public IP for Our Prmoxmox Backup Server on AWS Cloud

By default, an EC2 VM does not have a static IP so as you restart your present public IP will or may change and since we are planning to add this remote backup server to our on-premise proxmox pve server then we need a static public IP for our cloud Backup Server.

To get a static IP we need to configure an elastic IP and attach it to our back server VM.

In order to set up an Elastic IP go to EC2 Dashboard from the left pane–>Network and Security –> Elastic IPs, Select Elastic IP –> right menu select Allocate Elastic IP Address–> A new page open don’t change anything just click Allocate then you will see the following page.

allocate aws elastic ip to ec2 proxmox backup server vm

Now it’s time to attach this elastic IP to your proxmox backup VM. Now go to Actions–> Associate Elastic IP Address and then the following page opens.

associate elastic ip to instance from the drop down list.

Now choose your newly created instance and then select Associate and then the elastic IP will be associated to your proxmox backup server instance to verify go to EC2 Dashboard –> Instances and then see your newly created instance IP by scrolling a little right and then you will see the new elastic IP attached.

It is highly recommended to name your AWS cloud instance to something meaningful.

changing ec2 instance name

And there you have it, a state-of-the-art backup server on the ec2 AWS cloud, which is ready to act as an offsite backup and disaster recovery facility.

Ready To Send Local VM Backups To Remote Disaster Facility?

Here is an easy guide to backup local VMs to a remote proxmox backup server (Remote Disaster Recovery Site).

Next:

How To Backup VMs To A Remote Proxmox Backup Server
How To Install Proxmox Backup Server As A VM on Proxmox VE (PVE)

Leave a Reply

Your email address will not be published. Required fields are marked *