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 options | Required / Optional | Description |
---|---|---|
-mf | Required | Migration database description file. |
-ma | Required | Migration actions (possible values are : control-check, create-schema, drop-schema, export, import, merge, script and test-connectivity). |
-msn | Optional | Migration script name (this value must match an entry in the scripts section of migration database description file). |
-md | Optional | Migration database name (possible values are : origin and destination). |
-df | Optional | The data file used with the import action. |
-out | Optional | Output folder for generated files. |
--sfiler-version | Optional | Liquibase version of SFiler. |
Method... | Optional | Create 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