Commit a235f54b authored by Robert Ricci's avatar Robert Ricci

Add script to use from a client

RSyncs over files then runs a (ZFS only) snapshot
parent 5c6d8f01
#!/bin/bash
RSYNC=rsync
BACKUPHOST=$1
THISHOST=`hostname`
LOCALDIR=$2/
REMOTEDIR=/backup/$THISHOST/
if ! [ ${1:+1} ]
then
echo "ERROR: Need host"
exit 1;
fi
if ! [ ${2:+1} ]
then
echo "ERROR: Need local path"
exit 1;
fi
$RSYNC --exclude-from=$LOCALDIR/.rsync-excludes -avzhe ssh --delete $LOCALDIR $BACKUPHOST:$REMOTEDIR && ssh $BACKUPHOST 'cd snappy; ./snappy snapzfs $THISHOST'"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment