This article explains how to use amazon s3 bucket as backup service with virtualmin / webmin.
How to configure Amazon S3 bucket properly
A crucial step in creating amazon s3 bucket is the location. Not all locations support Signature version 2 and thus only a few locations work with virtualmin backup system.
Amazon s3 bucket locations that support signature version 2 are:
- US East (N. Virginia) Region
- US West (N. California) Region
- US West (Oregon) Region
- EU (Ireland) Region
- Asia Pacific (Tokyo) Region
- Asia Pacific (Singapore) Region
- Asia Pacific (Sydney) Region
- South America (São Paulo) Region
Make sure your amazon s3 bucket is created in these regions, so that it works with virtualmin backup system.
How to setup backups on virtualmin using amazon s3 bucket
To setup backups on virtualmin / webmin using amazon s3 bucket, follow these steps.
1. login to your webmin / virtualmin admin panel
2. Go to: Backup and Restore > Cloud Storage Providers > Amazon S3
3. Configure Amazon S3 configuration. These three steps are necessary:
- Change None set to Entered below
- Enter Access Key
- Enter Secret Key
Save the settings.
4. Go to backup virtual servers. Select the virtual server (or servers) & configure settings. Follow these instructions to configure Destination and Format
- Select Amazon S3 Bucket from Backup destinations
- Enter the s3 bucket name and subfolder that you want for this backup. For example: my-bucket-name or my-bucket-name/folder-name (note: without trailing slash at the end)
- If you want the folder to be sorted by date, then name it like this for example: my-bucked-name/folder-name/%Y-%m-%d
- If you add the date formatting to the destination name, then do select the next option Do strftime-style time substitutions on file or directory name
Save the settings and run the backup.
You can use the same settings for scheduled backups too.
Note: you may encounter errors while virtualmin tries to upload the backup file to amazon s3 bucket if these settings are not done properly. For example:
Invalid HTTP response : HTTP/1.1 400 Bad Request
Please let me know if you encounter any difficulty while backing up your virtualmin virtual server domains on to amazon s3.
2 comments on “Virtualmin amazon s3 backup”
You saved me hours! – many thanks couldn’t work out why it wasn’t working :)
You’re welcome Martin. I’m glad to know that it was helpful :)