Backup Webmin/Virtualmin servers on Amazon S3

Any server should have backup setup – first obvious statement. Backups should be located outside the server being backed up – second obvious question.

Amazon S3 has been around for a lot of years and proved to be a very good service. It has a free tier and also the prices are quite competitive. This article is about backing up information from a Virtualmin powered server, which offers good support for Amazon S3.

Amazon S3

So, first step is creating an account. This can be done easily here:

You will be asked for a phone number and then the validation will be done via a phone call.

Secondly, you need to create a bucket. Go again to:

Do the following:

  • Click “Create bucket” button;
  • Choose a name and a region close to your server’s location;
  • If you have the time and willingness to learn, you should visit the detailed description for the options.
    However, for the purposes of this (lightweight) tutorial, we will use the defaults.

Make sure you have access credentials (Virtalmin will use Amazon’s programatic access to S3). In case you don’t have a user already setup, access:

Create a new user here and make sure the new user has permissions to access the S3 buckets.

Virtualmin

Virtualmin will automatically create and delete buckets.

  1. Go to the Virtualmin Tab > Backup and Restore > Cloud Storage providers and add your Amazon S3’s Access Key and Secret Key

  2. After successfully connecting your S3 account, go to Virtualmin Tab > Backup and Restore > Scheduled backups and configure the backup you want.
    My choices would be for all servers, weekly and for deleting old backups after 30 days. I think this is optimal for a low usage server.

Quick local backups

Virtualmin also provides an option to locally backup your hosted websites. Go to Virtualmin Tab > Backup and restore > Backup virtual servers to use it. This could be useful for a manual backup done from time to time, in case you cannot/do not want to use S3.

Sources