Skip to content

Instantly share code, notes, and snippets.

@leafnode
Created March 16, 2014 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leafnode/9585766 to your computer and use it in GitHub Desktop.
Save leafnode/9585766 to your computer and use it in GitHub Desktop.
Encrypting files before uploading to backup
$ for i in *; do j=`echo "$i" | iconv -f UTF8 -t ASCII//TRANSLIT`; zip -r -0 - "$i" | openssl enc -aes256 -e -k my_secret_key > "$j.zip.enc"; done
@leafnode
Copy link
Author

  • Renaming to remove Polish national characters (glacier-cmd doesn't like them - yay for UTF in Python)
  • Zipping (to reduce number of Glacier reqests)
  • Encrypting with openssl's aes256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment