Use search-path to locate changelogs on S3

Last updated: July 14, 2025

Both a directory in the search path and a relative path are required to find changelog files or snapshot files. Follow the steps below to learn how to set up both of these and configure them.

Procedure

1

Determine the paths necessary to locate the changelog to use

If changelog resources, such as additional included changelogs or SQL files are in a different path, you will have multiple items in the searchpath. If a changelog file is in S3 at s3://myBucket/demo and the SQL files referenced by the changelog are in s3://myBucket/demo/sqlFiles, your search path is s3://myBucket/demo,s3://myBucket/demo/sqlFiles.

2

Provide the searchpath and a filename or relative path to the changelogfile in remote storage.

Example 1: update-sql command using a changelog file in remote storage:

liquibase --searchpath=s3://myBucket/demo,s3://myBucket/demo/sqlFiles update-sql --changelog-file=example-changelog.sql liquibase --search-path=s3://mybucket/demo update-sql --changelog-file=example-changelog.sql

Example 2: update-sql command using a relative path to the changelog file in remote storage:

If the changelog is located in subdirectory like s3://myBucket/demo/changelogs, when you use the searchpath defined in the previous example, then you must specify the relative path to the changelog:

liquibase --search-path=s3://myBucket/demo,s3://myBucket/demo/sqlFiles update-sql --changelog-file=changelogs/example-changelog.sql

Note: Paths to changelogs must always be relative to preserve integrity of the Liquibase DATABASECHANGELOG tracking table.