Manually create a snapshot and run checks

Last updated: November 18, 2025

Manually take a snapshot of your database and run checks against an offline database URL.

Note: This snapshot is not permanently retained.

Before you begin

  • Establish a snapshot.

  • Add the offline location to your liquibase.properties file.

Procedure

1

Create a snapshot.

Replace mySnapshot.json and =json with the desired snapshot file title and format.
liquibase --output-file=*mySnapshot*.json snapshot --snapshotFormat=json
2

Add the offline snapshot URL to the liquibase.properties file:

Replace DB_SHORTNAME with the database type being used (SQL, XML, YAML, or JSON). Also replace mySnapshot.json with the desired snapshot file title and format.
liquibase.command.url: offline:DB_SHORTNAME?snapshot=mySnapshot.json

The type of database is determined from the url property if at least one database scope check is enabled. If the database cannot be determined, Liquibase automatically generates SQL to check against using H2.

3

Run the checks run command.

liquibase checks run --checks-scope=database --url="offline:oracle?snapshot=mySnapshot.json"

--checks-scope with offline snapshot URL output

Liquibase Community 4.9.1 by Liquibase Database snapshot for jdbc:h2:tcp://localhost:9090/mem:integration ----------------------------------------------------------------- Database type: H2 Database version: 2.1.210 (2022-01-17) Database user: DBUSER Included types: liquibase.structure.core.Catalog liquibase.structure.core.Column liquibase.structure.core.ForeignKey liquibase.structure.core.Index liquibase.structure.core.PrimaryKey liquibase.structure.core.Schema liquibase.structure.core.Sequence liquibase.structure.core.Table liquibase.structure.core.UniqueConstraint liquibase.structure.core.View Liquibase command 'snapshot-reference' was executed successfully.