BRIX On-Premises > BRIX On-Premises Standard / Data migration from embedded to external databases in BRIX Standard

Data migration from embedded to external databases in BRIX Standard

To increase flexibility and fault tolerance of the system, you can migrate data from databases inside the Kubernetes cluster to external storage. In BRIX Standard, this can be done with the elma365-docker.sh script.

The main steps of the migration process:

  1. Create a data dump.
  2. Update BRIX application parameters.
  3. Restore data on external storage.

начало внимание

After moving databases to external storages, system reactivation is required.

конец внимание

Step 1: Create a data dump

  1. Stop the BRIX Standard application:

sudo ./elma365-docker.sh --stop

The application will become unavailable while a backup copy is created.

  1. To back up the databases, run the elma365-docker.sh installation script with the --dump key:

sudo ./elma365-docker.sh --dump

Example of running the installation script with the --dump key:
embedded-to-external-database-standard-1

When the backup is complete, you will see a message stating that the dump was successful.

The dump will be saved to a separate backup folder. Its name specifies the system version and time stamp, for example, "/backup/ELMA365_2023.2.15_2023.04.10-13.52.26".

The path to save the dump is specified in the ELMA365_BACKUP_DIR parameter of the config-elma365.txt configuration file. For more details on how to specify a different path, see the Modify BRIX Standard parameters article.

  1. Start the BRIX Standard application:

sudo ./elma365-docker.sh --start

Step 2: Update BRIX application parameters

  1. In the config-elma365.txt configuration file, enter the parameters for connecting to external databases.
  2. To save the changed parameters of the BRIX Standard (KinD) application, upgrade the application using the elma365-docker.sh installation script — run it with the --upgrade key. This can be done in one of the following ways:
  • Via the Internet connection:

sudo ./elma365-docker.sh --upgrade

  • Without the Internet connection:

sudo ./elma365-docker.sh --offline --upgrade

After running the installation script, the installed version number of BRIX Standard (KinD) will be detected and you will be asked to upgrade to a new version.

As you apply the new parameters, the BRIX Standard (KinD) versions will match. Example:

embedded-to-external-database-standard-2

  1. Confirm the upgrade by typing [Y]. Specifying any other character will interrupt the application upgrade.
  2. Wait until the application upgrade is complete. You will see the message: Upgrade BRIX application successful.

Step 3: Restore BRIX Standard (KinD) data

Restore data from backups on external databases.

  1. Stop the BRIX Standard application:

sudo ./elma365-docker.sh --stop

  1. If the external PostgreSQL and MongoDB databases were previously used, prepare them for restoration by following the steps below:
  1. Run data restoration using the command with the --restore and --path /backup/<backup-folder-name> keys:

sudo ./elma365-docker.sh --restore --path /backup/<backup-folder-name>

Important: to restore data, the backup must be placed in the folder that is specified in the configuration file. Restoration is not supported if the data is stored in a subfolder, such as /backup/brix/<backup-folder-name>.

Example of installation script execution:

embedded-to-external-database-standard-3

When you finish restoring data from the backup, you will see a message stating that the restoration was successful.

  1. Start the BRIX Standard application:

sudo ./elma365-docker.sh--start