Last active
September 6, 2020 04:52
-
-
Save fyears/5bbaeb2e4c620cf023f3f5ea308c665e to your computer and use it in GitHub Desktop.
note about command line for backing up and encryption at the same time
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
# see https://askubuntu.com/questions/95920 | |
# and this https://willhaley.com/blog/encrypt-single-file-linux-aes-gpg/ | |
# and that https://github.com/SixArm/gpg-encrypt/blob/master/gpg-encrypt | |
tar -cz your_dir | gpg \ | |
--no-symkey-cache \ | |
--cipher-algo AES256 \ | |
--digest-algo sha256 \ | |
--cert-digest-algo sha256 \ | |
--compress-algo none -z 0 \ | |
--s2k-mode 3 \ | |
--s2k-digest-algo sha512 \ | |
--s2k-count 65011712 \ | |
--force-mdc \ | |
--quiet --no-greeting \ | |
--pinentry-mode=loopback \ | |
-o your_archive.tar.gz.gpg \ | |
-c | |
gpg -d your_archive.tar.gz.gpg | tar xz | |
# save config to gpg conf | |
echo "cipher-algo AES256" >> ~/.gnupg/gpg.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment