diff --git a/db/openshift.deploy.yml b/db/openshift.deploy.yml index fd913bb4..4d4420a4 100644 --- a/db/openshift.deploy.yml +++ b/db/openshift.deploy.yml @@ -376,7 +376,7 @@ objects: echo "No backup SQL file is found" else echo "Found SQL file, rename existing database, and create a new empty database" - psql -h ${NAME}-${ZONE}-${COMPONENT} -U ${POSTGRES_USER} -c "ALTER DATABASE fom RENAME TO ${RENAME_DATABASE_TO};" -c "CREATE DATABASE fom;" + psql -h ${NAME}-${ZONE}-${COMPONENT} -U ${POSTGRES_USER} -c "ALTER DATABASE fom RENAME TO ${OLD_FOM_DATABASE_NAME};" -c "CREATE DATABASE fom;" echo "Running SQL file: $sql_file" psql -h ${NAME}-${ZONE}-${COMPONENT} -U ${POSTGRES_USER} -d ${POSTGRES_DB} -f $sql_file echo "Finish database restore" @@ -407,8 +407,8 @@ objects: # BACKUP_FILE_DIR need to be set manually, in the format for example, daily/2024-08-16, where backup container puts the backup files - name: BACKUP_FILE_DIR value: "" - # RENAME_DATABASE_TO need to be set manually, rename the existing fom database to a new name - - name: RENAME_DATABASE_TO + # OLD_FOM_DATABASE_NAME need to be set manually, rename the existing fom database to a new name + - name: OLD_FOM_DATABASE_NAME value: "" volumes: - name: ${NAME}-${ZONE}-${COMPONENT}-restore