Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A PostgreSQL Ephemeral database copy is created using the following command

...

code similar to below

Code Block
pg_dump -h <hostname> -p <port> -U <liquibase_user> -F c -n <schema(s)> -n <tracking_schema> --schema-only -f <backup_dir> <db_name>
CREATE DATABASE <db_name>_eph
pg_restore -h <hostname> -p <port> -U <liquibase_user> -F c -n <schema(s)> -n <tracking_schema> --schema-only -d <db_name>_eph <backup_dir>

Pre-requisites

  • Requires Liquibase Enterprise 8.8 and higher

  • The Liquibase user for the first database in the pipeline must have permission to create databases.

...

Package Method Name

Description

BackupRestoreEphemeralPostgres

The new database will be created on the same server as the original database. Eg. if I want to use the DEV database, the cloned db will be created on the same instance server as the DEV database.

See: Use the Required deployPackager.properties File

...

Update the deployPackager.properties file to set the following properties:

Code Block
databaseBackupRestoreMethod=BackupRestoreEphemeralPostgres
databaseBackupRestoreLocation=<location to house backup files>

2. Optional Step: Associated deployPackager.properties

...