Skip to content

Instantly share code, notes, and snippets.

@Janaka-Steph
Forked from dwallraff/keybase_backup.sh
Created February 5, 2019 15:20
Show Gist options
  • Save Janaka-Steph/f4f45004d4fd2d9a9e57c6555bf7fed1 to your computer and use it in GitHub Desktop.
Save Janaka-Steph/f4f45004d4fd2d9a9e57c6555bf7fed1 to your computer and use it in GitHub Desktop.
Encrypted tarball backup for keybase private folder backup
## Encrypt
tar cz * | openssl enc -e -aes-256-cbc -salt -out keybase_`date "+%Y%m%d"`.tar.gz.enc
## Decrypt
openssl enc -d -aes-256-cbc -salt -in <ENCRYPTED_KEYBASE_TARBALL> | tar xvz
## Crontab
10 12 * * * cd /Users/dwallraff/backups && tar cz /keybase/private/dwallraff | openssl enc -e -aes-256-cbc -salt -k $PASSWORD -out keybase_`date "+%Y%m%d"`.tar.gz.enc >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment