diff --git a/backup.fish b/backup.fish index ec10673..974397c 100755 --- a/backup.fish +++ b/backup.fish @@ -24,7 +24,6 @@ if [ -d $REMOTE_PATH ] exit end mkdir $LUKS_MOUNT -read x sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT " @@ -34,15 +33,16 @@ if test "$argv" = '--browse' echo "LUKS mounted, connecting..." set_color normal ssh -i $KEY $USER@$REMOTE - exit -end +else -# sync with rsync -set_color -o green -echo "Syncing filesystem..." -set_color normal + # sync with rsync + set_color -o green + echo "Syncing filesystem..." + set_color normal -rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozEP ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options + rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozEP ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options + +end # unmount luks container set_color -o green