Last active
February 6, 2021 15:08
-
-
Save edhemphill/459b0cd2787befccf9cadf5089bbff65 to your computer and use it in GitHub Desktop.
Use Duplicati for Backup to S3 on Ubuntu Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# You need Duplicati installed | |
# First on Ubuntu it uses mono :( unfortunately: | |
# apt-get install mono-runtime | |
# get the latest Duplicati 2.0 - go here--> http://www.duplicati.com/download | |
# wget https://updates.duplicati.com/experimental/duplicati_2.0.1.30-1_all.deb | |
# sudo dpkg -i duplicati_2.0.1.30-1_all.deb | |
# | |
# After install you will have a 'duplicati-cli' which is a script which runs the mono program: Duplicati.CommandLine.exe | |
# | |
# For more info: duplicati-cli help backup & duplicati-cli help s3 | |
# backup to an s3 bucket: | |
BUCKET_NAME="my-backup" | |
BUCKET_FOLDER="backups" | |
AWS_SECRET_KEY="xxxxxx-LONGER-ONE:)-xxxxxx" | |
AWS_ACCESS_KEY="ABCDEFGHXXXXXX" | |
BACKUP_DIR="backup-this-dir" | |
duplicati-cli \ | |
--aws_secret_access_key=\"${AWS_SECRET_KEY}\" \ | |
--aws_access_key_id=\"${AWS_ACCESS_KEY}\" \ | |
--s3-ext-signatureversion=4 \ | |
--use-ssl \ | |
--s3-location-constraint=us-east-1 \ | |
backup s3://${BUCKET_NAME}/${BUCKET_FOLDER} ${BACKUP_DIR} | |
# the --s3-ext-signatureversion=4 is needed if the bucket is in a newer region. | |
# ISSUES: There seems to be a problem uploading to us-east-2. I filed a ticket here: https://github.com/duplicati/duplicati/issues/2175 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment