init copy

You can use the init copy subcommand to copy project files from a source directory to a target directory. It is available in Liquibase 4.6.0 and later.

Uses

Use the copy subcommand if you have an existing Liquibase project that you want to duplicate, such as testing a specific configuration of changelogs and properties that would be difficult to recreate manually. You can also specify whether you want to recursively copy files within subdirectories of your source directory.

Tip: If you want Liquibase to create a new project for you with default settings and files, use the init project command instead.

Syntax

To run init copy, type the following into your command line:

init copy --source=<path/to/directory> --target=<path/to/directory> --recursive=<true|false>

Note: The copy subcommand can be replaced by its alias which is project-clone.

Example: init project-clone --source=<path/to/directory> --target=<path/to/directory> --recursive=<true|false>

Command parameters

Attribute Description Requirement

--recursive=<true|false>

Recursively copy files from the source directory. Default: false

Optional

--source=<string>

Source directory where the project files will be copied from. Default: .

Optional

--target=<string>

Path to the directory where the project files will be created

Optional
Attribute Description Requirement

cmdArgs: { recursive: "<true|false>" }

Recursively copy files from the source directory. Default: false

Optional

cmdArgs: { source: "<string>" }

Source directory where the project files will be copied from. Default: .

Optional

cmdArgs: { target: "<string>" }

Path to the directory where the project files will be created

Optional
Attribute Description Requirement

liquibase.command.recursive: <true|false>

liquibase.command.init.copy.recursive: <true|false>

Recursively copy files from the source directory. Default: false

Optional

liquibase.command.source: <string>

liquibase.command.init.copy.source: <string>

Source directory where the project files will be copied from. Default: .

Optional

liquibase.command.target: <string>

liquibase.command.init.copy.target: <string>

Path to the directory where the project files will be created

Optional
Attribute Description Requirement

JAVA_OPTS=-Dliquibase.command.recursive=<true|false>

JAVA_OPTS=-Dliquibase.command.init.copy.recursive=<true|false>

Recursively copy files from the source directory. Default: false

Optional

JAVA_OPTS=-Dliquibase.command.source=<string>

JAVA_OPTS=-Dliquibase.command.init.copy.source=<string>

Source directory where the project files will be copied from. Default: .

Optional

JAVA_OPTS=-Dliquibase.command.target=<string>

JAVA_OPTS=-Dliquibase.command.init.copy.target=<string>

Path to the directory where the project files will be created

Optional
Attribute Description Requirement

LIQUIBASE_COMMAND_RECURSIVE=<true|false>

LIQUIBASE_COMMAND_INIT_COPY_RECURSIVE=<true|false>

Recursively copy files from the source directory. Default: false

Optional

LIQUIBASE_COMMAND_SOURCE=<string>

LIQUIBASE_COMMAND_INIT_COPY_SOURCE=<string>

Source directory where the project files will be copied from. Default: .

Optional

LIQUIBASE_COMMAND_TARGET=<string>

LIQUIBASE_COMMAND_INIT_COPY_TARGET=<string>

Path to the directory where the project files will be created

Optional