#backup
Backup
→ benchmarks
→ Duplicacy
- the best according to benchmarks
- github
- the licensing scheme is incompatible with usage
→ Duplicity
→ Backup an encrypted directory on s3
#!/usr/bin/env sh
# Your GPG key
GPG_KEY=<the-gpg-key>
SOURCE=/
# The S3 destination followed by bucket name
DEST="s3://the-bucket"
alias duplicity="docker run --rm --user root \
-e AWS_ACCESS_KEY_ID=<id> \
-e AWS_SECRET_ACCESS_KEY=<key> \
-e PASSPHRASE=<gpg pass> \
-v /root/.cache:/home/duplicity/.cache/duplicity \
-v /root/.gnupg:/home/duplicity/.gnupg \
-v /:/data:ro \
wernight/duplicity \
duplicity"
duplicity \
--full-if-older-than 1M \
--encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} \
--allow-source-mismatch \
--s3-use-glacier \
--s3-region-name=<s3-region> \
--s3-endpoint-url=<s3-endpoint>> \
--include=/opt \
--exclude=/** \
${SOURCE} ${DEST}
duplicity remove-all-but-n-full 1 --force ${DEST}
→ Restore the backup
This will restore the lastest state of the backup. Apparently, it is also possible to play with time --restore-time
.
SOURCE="s3://the-bucket"
DEST=/mnt/backup/mailu
duplicity \
restore \
--encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} \
--s3-region-name=<s3-region> \
--s3-endpoint-url=<s3-endpoint>> \
${SOURCE} ${DEST}
→ Restic
→ Rclone
Support for encrypted storage (with optional file-name/path obfuscation):
- create a storage (eg: scaleway)
- create a crypt storage referencing the former
- define a passkey to transparently encrypt/decrypt
- use the crypt storage to sync
# This will sync
rclone sync folderA crypt:folderA
# this will show the folder tree (useful in case encrypt path)
rclone tree crypt:folderA
# this will restore the folder
rclone copy crypt:folderA folderA
This page was last modified: