mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-22 23:12:32 +01:00
improved backup script
This commit is contained in:
parent
86958dda5f
commit
422d794f70
@ -6,6 +6,17 @@ SERVER=root@neon
|
||||
ROOT=/home
|
||||
REPOSITORY=$SERVER:$DIR
|
||||
|
||||
if [[ ! $(ssh SERVER) ]]
|
||||
then
|
||||
echo "Can't connect to server"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $1 == "list" ]]
|
||||
then
|
||||
ssh $SERVER BORG_PASSPHRASE=$BORG_PASSPHRASE borg list $DIR
|
||||
fi
|
||||
|
||||
if [[ ! $(ssh $SERVER BORG_PASSPHRASE=$BORG_PASSPHRASE borg list $DIR) ]]
|
||||
then
|
||||
ssh $SERVER mkdir -p $DIR
|
||||
|
Loading…
Reference in New Issue
Block a user