X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/blobdiff_plain/055e2cc6e3d94e1e7cc1d7158f54c4c95cdafa0f..903b8bbb2deed0a1a827915712ad2ce48b530f8e:/backmeupscotty?ds=inline diff --git a/backmeupscotty b/backmeupscotty index 965da29..d1500c1 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -32,6 +32,15 @@ function scottysync { rsync_exclude=$(eval echo --exclude={$3} | tr -d {}) fi + if (ssh $REMOTE_HOST '[ ! -d '$REMOTE_BASE/$2' ]'); then + echo BACKMEUPSCOTTY: Creating destination directory $REMOTE_HOST:$REMOTE_BASE/$2 + ssh $REMOTE_HOST "mkdir $REMOTE_BASE/$2" + fi + + if (ssh $REMOTE_HOST '[ -d '$REMOTE_BASE/$2/incomplete' ]'); then + echo BACKMEUPSCOTTY: Continuing old incomplete backup >&2 + fi + echo BACKMEUPSCOTTY: Starting rsync rsync -e ssh \ -v -aHAX --numeric-ids --delete --delete-excluded \