Created
September 12, 2022 14:05
-
-
Save jagland/b9a9bd5702b8837c7e25313f728a5b0a to your computer and use it in GitHub Desktop.
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 | |
# AWS secrets from the IAM account. | |
export AWS_ACCESS_KEY_ID="" | |
export AWS_SECRET_ACCESS_KEY="" | |
# Passphrase for duplicity backups (GPG encrypted) | |
export PASSPHRASE="" | |
# Backup folders | |
backupfolders="" | |
for j in $backupfolders; | |
do | |
echo --- backup for $j --- | |
if [ "$j" = "host1" ] || [ "$j" = "host2" ] ; then | |
trickle -s -d 700 -u 700 duplicity --asynchronous-upload --s3-use-glacier --full-if-older-than 90D /data/backup/$j/ boto3+s3://example-s3-bucket/$j-new --tempdir=/data/tmp --volsize=4096 | |
else | |
trickle -s -d 700 -u 700 duplicity --asynchronous-upload --s3-use-glacier --full-if-older-than 90D /data/backup/$j/ boto3+s3://example-s3-bucket/$j --tempdir=/data/tmp --volsize=4096 | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment