remove not neated wait_for_borg_backup_done
This commit is contained in:
@@ -20,7 +20,6 @@ function create_borg_backup {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait_for_borg_backup_done
|
|
||||||
echo "Creating Borg Backup from $FOLDER_TO_BACKUP into the Archive: $ARCHIVE_NAME"
|
echo "Creating Borg Backup from $FOLDER_TO_BACKUP into the Archive: $ARCHIVE_NAME"
|
||||||
borg create "${BORG_CREATE_PARAMS[@]}" "$BORG_REPO"::"$ARCHIVE_NAME-{now:%d.%m.%Y_%H:%M}" "$FOLDER_TO_BACKUP"
|
borg create "${BORG_CREATE_PARAMS[@]}" "$BORG_REPO"::"$ARCHIVE_NAME-{now:%d.%m.%Y_%H:%M}" "$FOLDER_TO_BACKUP"
|
||||||
}
|
}
|
||||||
@@ -38,18 +37,6 @@ function purge_borg_backup {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait_for_borg_backup_done
|
|
||||||
echo "Purging Borg Backup Archive: $ARCHIVE_NAME"
|
echo "Purging Borg Backup Archive: $ARCHIVE_NAME"
|
||||||
borg prune -a "$ARCHIVE_NAME-*" "${BORG_PRUNE_PARAMS[@]}"
|
borg prune -a "$ARCHIVE_NAME-*" "${BORG_PRUNE_PARAMS[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function wait_for_borg_backup_done {
|
|
||||||
local text_output=1
|
|
||||||
while pidof -x borg >/dev/null; do
|
|
||||||
if [ $text_output -eq 1 ]; then
|
|
||||||
echo "Borg already running, waiting that it finishes..."
|
|
||||||
text_output=0
|
|
||||||
fi
|
|
||||||
sleep 10
|
|
||||||
done
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user