Skip to content

Commit

Permalink
rename variable for restore script
Browse files Browse the repository at this point in the history
  • Loading branch information
MCatherine1994 committed Aug 20, 2024
1 parent e9e2414 commit 2b6199d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2b6199d

Please sign in to comment.