Using ecryptfs to mount encrypted directories
Rather than encrypted every backup file individually I find it useful to just put an ecryptfs overlay on a couple of directories and just write directly to them letting ecrypt take care of the encryption. In this example, I have a local drive that I write my daily incremental gnu tar file to. I then rsync that directory's contents to a mirror directory house on the IT microsoft network drive. This code snipet mounts the 2 ecrypt directories. I run this after rebooting my box since I don't want to store the passphrase anywhere. ECRYPT_OPTIONS="key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_passthrough=n,ecryptfs_enable_filename_crypto=n" sudo mount -t ecryptfs /scratch/myuser/encrypted /scratch/myuser/encrypted -o "${ECRYPT_OPTIONS}" || exit 4 sudo mount -t ecryptfs /mnt/dos/home/myuser/MyDocuments/encrypted /mnt/dos/home/myuser/MyDocuments/encrypted -o "${ECRYPT_OPTIONS}" || exit 5