Skip to content

migrate-database

This command migrates the S-Filer Portal database. This is a special command introduced when the S-Filer Portal database is migrated.

NOTE

This command will be removed in version 5.0.0 of the S-Filer Portal solution.

Syntax:

shell
sfiler-cli [options] migrate-database [command options]
Command optionsRequired / OptionalDescription
-mfRequiredMigration database description file.
-maRequiredMigration actions (possible values are : control-check, create-schema, drop-schema, export, import, merge, script and test-connectivity).
-msnOptionalMigration script name (this value must match an entry in the scripts section of migration database description file).
-mdOptionalMigration database name (possible values are : origin and destination).
-dfOptionalThe data file used with the import action.
-outOptionalOutput folder for generated files.
--sfiler-versionOptionalLiquibase version of SFiler.
Method...OptionalCreate a database without the default records.

Example:

This command migrates the database, consolidating the two databases into a single one.

shell
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" migrate-database -ma merge -mf migration-description.yaml

In this example, the migration-description.yaml configuration file would look like this:

yaml
migrate-database:
databaseMigration:
  sfilerVersion: 4.13.0
  databaseOrigin:
    url: jdbc:mysql://192.168.00.01:3306/sfilerconfig
    user: sfiler-config-user
    password: Passw0rd
    driver: com.mysql.cj.jdbc.Driver
  databaseDestination:
    url: jdbc:mysql://192.168.00.01:3306/sfilerdata
    user: sfiler-data-user
    password: Passw0rd
    driver: com.mysql.cj.jdbc.Driver