Activity: Apr, 2024 - Nov, 2024
■■■■■■■■Less ■■■■■ More
Encrypted Backup via rsync and gocryptfs
Please send patches or remarks to jayvii[AT]posteo[DOT]de
Atomic and encrypted backups made easy with a simple bash script.
Detailed description can be found on my blog
Uses well-known tools, following the UNIX-philosophy:
Preparation
Initilize gocryptfs with the Backup-source directory. If you want to backup (subdirectories of) your home-folder, do the following:
gocryptfs \
\ # initilise the volume
--init --reverse \ # use "reverse mode"
--plaintextnames \ # do not obfuscate names of files and directories
"$HOME" # target directory. Here: our home-folder
This will create a .gocryptfs.reverse.conf file with the encryption meta data. Do not lose this file or your encryption password.
Usage
To backup your home directory to a remote server via SSH, use following syntax:
./backup.sh "$HOME" "user[AT]example[DOT]com"
Backups are stored on the remote end in the folder named after the hostname of your source machine and the current month. If you do monthly updates, this leads to 12 backup versions before the first backup is overwritten.
Clone this repository via:
git clone https://https://src.jayvii.de/pub/rsync_encrypted_backup.git