Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A script I use to store encrypted backups of my files on dropbox
#!/bin/bash
DATE=$(date +%d.%m.%y-%H.%M)
# the unencrypted tar file
FILE=${DATE}Uhr.tar.gz
tar -czf ${FILE} -T .files_to_archive
# the encrypted tar file
ENCFILE=${FILE}.crypt
gpg -c -o ${ENCFILE} ${FILE}
# move encrypted archive to Dropbox
mv ${ENCFILE} Dropbox/backups
# delete original archive
rm ${FILE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment