Created
November 26, 2019 00:32
-
-
Save arobb/eca1f1ffd9fbdbe0230915c204cad929 to your computer and use it in GitHub Desktop.
Quick tar and encrypt
This file contains 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
# Include files that have been symlinked | |
tar -czf backup.tar.gz --dereference ./backup | |
gpg --armor --output backup.tar.gz.gpg --symmetric --cipher-algo AES256 backup.tar.gz | |
# Decrypt for a bunch of files | |
read -s -p "Enter Password: " pw | |
echo -ne "\033[0K\r" | |
echo "$pw" | gpg --batch --passphrase-fd 0 --output backup.tar.gz --decrypt backup.tar.gz.gpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment