made backup script more resilient to failure
This commit is contained in:
parent
5a40e7a699
commit
89f912299c
@ -26,6 +26,7 @@ end
|
||||
mkdir $LUKS_MOUNT
|
||||
sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME
|
||||
sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT
|
||||
echo "$LUKS_NAME" > .luks-device
|
||||
"
|
||||
|
||||
if test "$argv" = '--browse'
|
||||
@ -40,7 +41,7 @@ else
|
||||
echo "Syncing filesystem..."
|
||||
set_color normal
|
||||
|
||||
rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozE ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options
|
||||
rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozEv --delete ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options
|
||||
|
||||
end
|
||||
|
||||
@ -48,8 +49,10 @@ end
|
||||
set_color -o green
|
||||
echo "Syncing complete - unmounting luks container..."
|
||||
set_color normal
|
||||
read -P "Continue? Just press enter to start unmounting! "
|
||||
ssh -t -i $KEY $USER@$REMOTE "
|
||||
sudo umount $LUKS_MOUNT
|
||||
sudo cryptsetup close --type luks $LUKS_NAME
|
||||
sudo cryptsetup close --type luks (cat .luks-device)
|
||||
rmdir $LUKS_MOUNT
|
||||
"
|
||||
rm .luks-device
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user