Liquibase Enterprise was formerly known as Datical DB.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This feature is available in v8.2 and later.

The default backup and restore method used during packaging requires you to download the Oracle client tools (expdp/impdp) and call them through the Oracle Full Client.

Alternatively, you can configure Deployment Packager to use the Oracle Flashback feature, eliminating the need to install the client and expdp/impdp.

Pre-requisites

  • Use Liquibase Enterprise 8.2 and higher

  • Flashback should be enabled and configured in Oracle Database instance

  • DATICAL_USER database connection user should have SYSBACKUP privileges

Limitations

  • Flashback feature works ONLY for PDB database

    • You cannot perform Flashback against CDB database

  • Flashback feature works ONLY for Oracle 12.2, 18c, 19c

  • Flashback feature does not work for Oracle RDS

Enabling Flashback Database

First of all, you need to create folder, where flashback restore points will be stored.
For example:

mkdir <your_location_for_DB_RECOVERY_FILE_DEST>

** Better to create the folder somewhere in Oracle installation directory, we will sure that Oracle Database has read/write access to the folder in this case

Next step is to connect to Oracle Database using SQLPLUS and connection user with SYSDBA privileges.
After we successfully connected to Oracle Database, we need to perform the following SQL commands:

-- specify path where to store flashback restore points
-- 'your_location_for_DB_RECOVERY_FILE_DEST' is absolute path to folder which we created in 1st step
ALTER SYSTEM SET db_recovery_file_dest='your_location_for_DB_RECOVERY_FILE_DEST' scope=spfile;

-- Depending on size of your PDB which will be backed up using flashback, 
--      you can increase size of restore point file 
ALTER SYSTEM SET db_recovery_file_dest_size=10g scope=spfile;

-- Optionally, specify the length of the desired flashback window (in minutes) 
--      by setting the DB_FLASHBACK_RETENTION_TARGET initialization parameter.
-- The default value for this parameter is 1440 minutes,
--      which is one day. The following command specifies that the flashback window must be 3 days.
ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABSAE ARCHIVELOG;
ALTER DATABASE FLASHBACK ON;

Use the following command to check if Flashback Database is enabled for your target database:

SELECT FLASHBACK_ON FROM V$DATABASE;

Enable Flashback for Backup and Restore in datical project

To use the Oracle Flashback for Backup and Restore, set the databaseBackupRestoreMethod option in deployPackager.properties file:
databaseBackupRestoreMethod=BackupRestoreOracleFlashback

See: Use the Required deployPackager.properties File

  • No labels