...
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> |
...
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
...
These are packaging properties available specifically for the ephemeral database packaging method. They are optional if you would like to override the default values.
Property Name | Description |
---|---|
ephemeralCleanUpBeforeStart | [Optional] Allows Liquibase to drop any existing Ephemeral database if found during an Ephemeral Packaging Operation. Existing databases can occur from failures or cancelations from previous Ephemeral Packaging jobs. Property Validation: true/false Available in Liquibase 8.9 and later. |
ephemeralCopyName | [Optional] Defines a name for a DB copy (has impact on PostgreSQL Ephemeral copy only). Default name for the ephemeral copy will be source database name with Property Validation: Copy name should be up to 124 characters long, contain no spaces [ ], slashes [/] and semicolons [;] and cannot begin with a number. |
ephemeralCopyWithData | [Optional] By default Liquibase will copy databases without data. (*) If you would like to copy both the structure and data, use this boolean property. (*) There is one exception in that the data from the Property Validation: true/false |
ephemeralSkipFinalDeploy | [Optional] The default value for this setting is false. Any changes being packaged are deployed to the first database in the pipeline during the Deploy Packager operation. Setting this value to true allows changes to be packaged and changesets to be created and stored in the changelog.xml, but the deployment to the first database in the pipeline does not occur. Property Validation: true/false |
...