aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xserver.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/server.sh b/server.sh
index 2b58798..d9c06b7 100755
--- a/server.sh
+++ b/server.sh
@@ -302,8 +302,6 @@ function is_in() {
}
function server_restore() {
- assert_not_running
-
local backup_dir
local snapshot_index
local dest="$PWD"
@@ -317,6 +315,10 @@ function server_restore() {
dest="$3"
fi
+ if [ "$dest" = "$PWD" ]; then
+ assert_not_running
+ fi
+
if [ ${#BACKUP_DIRS[@]} -eq 0 ]; then
log_error "No backup directories found, abort"
return 1