improved backup script

master
Anton Lydike 4 years ago
parent 43a8cebbcf
commit 44768618ad

@ -24,7 +24,6 @@ if [ -d $REMOTE_PATH ]
exit exit
end end
mkdir $LUKS_MOUNT mkdir $LUKS_MOUNT
read x
sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME
sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT
" "
@ -34,15 +33,16 @@ if test "$argv" = '--browse'
echo "LUKS mounted, connecting..." echo "LUKS mounted, connecting..."
set_color normal set_color normal
ssh -i $KEY $USER@$REMOTE ssh -i $KEY $USER@$REMOTE
exit else
end
# sync with rsync # sync with rsync
set_color -o green set_color -o green
echo "Syncing filesystem..." echo "Syncing filesystem..."
set_color normal 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 # unmount luks container
set_color -o green set_color -o green

Loading…
Cancel
Save