End of Sale Notice:
F5 NGINX is announcing the End of Sale (EoS) for NGINX Controller API Management Module, effective January 1, 2024.
F5 maintains generous lifecycle policies that allow customers to continue support and receive product updates. Existing NGINX Controller API- Management customers can continue to use the product past the EoS date. License renewals are not available after September 30, 2024.
See our End of Sale announcement for more details.
End of Sale Notice:
F5 NGINX is announcing the End of Sale (EoS) for NGINX Controller Application Delivery Module, effective January 1, 2024.
F5 maintains generous lifecycle policies that allow customers to continue support and receive product updates. Existing NGINX Controller Application Delivery customers can continue to use the product past the EoS date. License renewals are not available after September 30, 2024.
See our End of Sale announcement for more details.
Back Up & Restore an External Config Database
Learn how to back up and restore the external F5 NGINX Controller config database.
Overview
Follow the steps in this guide to back up and restore an external F5 NGINX Controller config database. Use this guide if you selected the option to use an external PostgreSQL config database when you installed NGINX Controller. External config means that you set up NGINX Controller to store configuration data in your own Postgres database.
Before You Begin
To backup and restore the external config database, you’ll need the following:
- Login credentials for your NGINX Controller PostgreSQL database
- A connection to your NGINX Controller PostgreSQL database
- psql and pg_dump installed on the server where you’ll be performing the backup or restore
Set the PostgreSQL Environment Variables
-
Log in to the NGINX Controller host using SSH.
-
Set the following environment variables using the credentials for your NGINX Controller PostgreSQL database:
export PGHOST=<postgres host> export PGPORT=5432 export PGUSER=<postgres user> export PGPASSWORD=<postgres password>
Note:
If you’ve configured PostgreSQL to use SSL, ensure that you’ve placed your certs in~/.postgresql
. For more information, see Client Certificates in the PostgreSQL documentation.
Back Up External Config Database
Take the following steps to back up the external NGINX Controller config database:
-
Stop NGINX Controller:
/opt/nginx-controller/helper.sh controller stop
-
Run the following script to back up the NGINX Controller database. The backup files are saved in a directory that looks like
pgbackup_<timestamp>
.DATE=$(date +"%Y%m%d%H%M") mkdir ~/pgbackup_${DATE} for db in common data system vault; do pg_dump -w -E utf8 ${db} -F c -f ~/pgbackup_${DATE}/${db}-${DATE}.backup done
-
Start NGINX Controller:
/opt/nginx-controller/helper.sh controller start
Restore External Config Database
Important:
If you restore the config database on top of a new installation of NGINX Controller, make sure to follow the steps to restore your NGINX config and encryption keys afterward.
To restore the external NGINX Controller config database:
-
Stop NGINX Controller:
/opt/nginx-controller/helper.sh controller stop
-
Locate the backup directory and save the name as a local environment variable. The name of the backup directory follows the format
pgbackup_<timestamp>
.BACKUP_PATH=~/pgbackup_<timestamp>
-
Run the restore script:
for backup_file in "$BACKUP_PATH"/*.backup; do db="$(basename "$backup_file" | cut -d '-' -f 1)" pg_restore -c -C -d "$db" "$backup_file" done
-
Start NGINX Controller:
/opt/nginx-controller/helper.sh controller start
What’s Next