GPG encrypted backups to rsync.net
I use rsync.net for my cloud/offline backups.
Here’s how to do gpg encrypted backups.
- Mount rsync.net using
sshfsand create a backup folder
1mkdir -p /home/your_user/rsync.net/
2sshfs 99999@server.rsync.net: /home/your_user/rsync.net/
3mkdir -p /home/your_user/rsync.net/backups/
- Create and encript a directory
1tar --xattrs -czpvf /tmp/2016-11-28_my_dir.tgz -C /home/your_user/my_dir .
2gpg --cipher-algo aes256 -c -o /home/your_user/rsync.net/backups/2016-11-28_my_dir.tgz.gpg /tmp/2016-11-28_my_dir.tgz
- Restore and decrypt a directory
1mkdir -p /tmp/extract
2cd /tmp/extract
3gpg -o- /tmp/2016-11-28_my_dir.tgz.gpg | tar zxvf -
- Unmount rsync.net
1fusermount -u /home/your_user/rsync.net/