Skip to content

Instantly share code, notes, and snippets.

@maedoc
Created November 6, 2017 10:06
Show Gist options
  • Save maedoc/bc322bb106ca46535dd01a9055c8059d to your computer and use it in GitHub Desktop.
Save maedoc/bc322bb106ca46535dd01a9055c8059d to your computer and use it in GitHub Desktop.
cheap-o encrypted remote backup
#!/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
@maedoc
Copy link
Author

maedoc commented Nov 6, 2017

Probably better to accomplish the mounts with autofs though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment