diff --git a/runs/restore.sh b/runs/restore.sh index 20a36c07b9..c9a1c91fc7 100755 --- a/runs/restore.sh +++ b/runs/restore.sh @@ -58,11 +58,13 @@ LOG_FILE="$OPENWB_BASE_DIR/data/log/restore.log" echo "Step 5.1: restore mosquitto db" if [[ -f "${WORKING_DIR}/mosquitto/mosquitto.db" ]]; then sudo mv -v -f "${WORKING_DIR}/mosquitto/mosquitto.db" "$MOSQUITTO_DB_DIR/mosquitto.db" + sudo chown mosquitto:mosquitto "$MOSQUITTO_DB_DIR/mosquitto.db" else echo "Backup does not contain mosquitto.db. Skipping restore." fi if [[ -f "${WORKING_DIR}/mosquitto_local/mosquitto.db" ]]; then sudo mv -v -f "${WORKING_DIR}/mosquitto_local/mosquitto.db" "$MOSQUITTO_LOCAL_DB_DIR/mosquitto.db" + sudo chown mosquitto:mosquitto "$MOSQUITTO_LOCAL_DB_DIR/mosquitto.db" else echo "Backup does not contain local mosquitto.db. Skipping restore." fi