Created
February 2, 2019 23:42
-
-
Save jackkamm/46abeea37bd2bf622519f6729c27d61d to your computer and use it in GitHub Desktop.
backup $HOME
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
# This is a simple script to backup, compress, and encrypt $HOME | |
set +e | |
# set recipient for encryption | |
RECIPIENT="jackkamm@gmail.com" | |
# To improve I/O, keep $DEST on local filesystem, | |
# and copy it to external medium afterwards | |
DEST=/var/tmp/backup_home.tar | |
# $DEST assumed to be outside $HOME; otherwise "tar --exclude" it | |
tar -cf $DEST -C $HOME . | |
pigz $DEST | |
gpg --recipient $RECIPIENT --encrypt $DEST.gz | |
rm $DEST.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment