Created
November 6, 2017 10:06
-
-
Save maedoc/bc322bb106ca46535dd01a9055c8059d to your computer and use it in GitHub Desktop.
cheap-o encrypted remote backup
This file contains hidden or 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 | |
mkdir -p /tmp/cerb_1 | |
sshfs $host_dir /tmp/cerb_1 | |
mkdir -p /tmp/cerb_2 | |
encfs /tmp/cerb_{1,2} | |
for d in $@ | |
do | |
rsync -rav $d /tmp/cerb_2/ | |
done | |
umount /tmp/cerb_2 | |
umount /tmp/cerb_1 | |
# cron that sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably better to accomplish the mounts with autofs though