improved backup script
This commit is contained in:
parent
43a8cebbcf
commit
44768618ad
18
backup.fish
18
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,16 +33,17 @@ if test "$argv" = '--browse'
|
||||
echo "LUKS mounted, connecting..."
|
||||
set_color normal
|
||||
ssh -i $KEY $USER@$REMOTE
|
||||
exit
|
||||
else
|
||||
|
||||
# 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
|
||||
|
||||
end
|
||||
|
||||
# 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
|
||||
|
||||
# unmount luks container
|
||||
set_color -o green
|
||||
echo "Syncing complete - unmounting luks container..."
|
||||
|
Loading…
Reference in New Issue
Block a user