Last active
December 26, 2015 07:28
-
-
Save NiklasMM/7115008 to your computer and use it in GitHub Desktop.
A script I use to store encrypted backups of my files on dropbox
This file contains hidden or 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
#!/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