Last active
August 29, 2015 14:14
-
-
Save droptableuser/6b1868ed1fcc702d1ffe to your computer and use it in GitHub Desktop.
store backups on an untrusted share
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
#!/bin/bash | |
cd /backup/snapshot | |
for i in $(ls -A) | |
do | |
cd $i | |
ssh backup@$i \ 'tar zcf - /etc /opt' | gpg -e -r backup > $i.tar.gz | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment