Last active
February 9, 2023 19:37
-
-
Save cristianrasch/8ecf9e78d2c300632179 to your computer and use it in GitHub Desktop.
rsyncrypto tutorial
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
# Generate your backup private key and certificate | |
openssl req -nodes -newkey rsa:1536 -x509 -keyout backup.key -out backup.crt | |
# Encrypt your data to a temporary folder | |
rsyncrypto --verbose --ne-nesting=2 --trim=2 --name-encrypt=/tmp/rsyncrypto-map --delete-keys --changed --recurse /home/cristian/Dropbox/ /tmp/Dropbox/ /tmp/rsyncrypto-keys ~/Dropbox/backups/laptop/crypto/rsyncrypto/backup.crt | |
# Send it over the network | |
rsync --verbose --archive --compress --delete /tmp/Dropbox/ pi:~/backups/laptop | |
# Decryption time! | |
# First, generate the mapping file | |
rsyncrypto --decrypt /tmp/Dropbox/filemap ~/Desktop/Dropbox/filemap ~/Desktop/Dropbox/filemap-keys ~/Dropbox/backups/laptop/crypto/rsyncrypto/backup.key | |
# and finally decrypt away placing files under ~/Desktop/Dropbox/files | |
rsyncrypto --trim=2 --name-encrypt=/home/cristian/Desktop/Dropbox/filemap --verbose --recurse --decrypt /tmp/Dropbox ~/Desktop/Dropbox/files ~/Desktop/Dropbox/keys ~/Dropbox/backups/laptop/crypto/rsyncrypto/backup.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment