parent
f09eb4db94
commit
2975304503
@ -0,0 +1 @@
|
||||
DOMAIN=scorpius
|
@ -0,0 +1,8 @@
|
||||
We currently support duplicity backing up to backblaze B2 storage.
|
||||
|
||||
You will need to populate `secrets/backup` with:
|
||||
|
||||
- application-key & application-key-id from backblaze b2 commandline or web
|
||||
- passphrase for gnupg encrypted backups
|
||||
|
||||
This will create a new bucket named ${HOSTNAME}-backup
|
@ -0,0 +1,19 @@
|
||||
. ../../env.production
|
||||
|
||||
service=$(basename $PWD)
|
||||
secrets="../../secrets/$service"
|
||||
|
||||
redo-ifchange ../../env.production \
|
||||
$secrets/application-key-id \
|
||||
$secrets/application-key \
|
||||
$secrets/passphrase
|
||||
|
||||
read B2_APPLICATION_KEY_ID < $secrets/application-key-id
|
||||
read B2_APPLICATION_KEY < $secrets/application-key
|
||||
export BUCKET_NAME=${DOMAIN}-backup
|
||||
|
||||
export DESTINATION=b2://${B2_APPLICATION_KEY_ID}:${B2_APPLICATION_KEY}@${BUCKET_NAME}
|
||||
|
||||
read PASSPHRASE < $secrets/passphrase
|
||||
env PASSPHRASE=$PASSPHRASE duplicity backup ../../data $DESTINATION >&2
|
||||
env PASSPHRASE=$PASSPHRASE duplicity remove-older-than 28D $DESTINATION >&2
|
Loading…
Reference in new issue