You can migrate data from databases within a Kubernetes cluster to external storages using:
- External tools. Read more in the Data migration from embedded to external databases in HUMMIX On-Premises article.
- hummix-Backupper utility.
The main steps of data migration using hummix-Backupper utility:
Attention
After migrating databases to external storages, system reactivation is required.
Step 1: Back up databases
- Install the hummix-Backupper utility and set up its configuration. Read more about it in the Back up and recover databases article.
- Back up the HUMMIX application databases:
hummix-backupper backup <<db-type>>
Where <<db-type>> is the name of the database that you want to back up. Value options:
mongospecifies MongoDB.postgresspecifies PostgreSQL.s3specifies S3 storage.allspecifies all databases (MongoDB, PostgreSQL, S3).
To specify two databases, you can combine the mongo, postgres, and s3 values by separating them with commas. For example, postgres,s3 or mongo,postgres.
Step 2: Update HUMMIX application parameters
- Since the hummix-Backupper utility gets the database path settings from the
values-hummix.yamlconfiguration file, specify the values of external storages in this file. - Update the HUMMIX application parameters using the
values-hummix.yamlconfiguration file.
Updating parameters via the Internet
helm show chart hummix/hummix root@hummix-node1:~#
The chart version will be specified in the
helm upgrade --install hummix hummix/hummix -f values-hummix.yaml --version <hummix-chart-version> --timeout=30m --wait [-n namespace]
|
Updating parameters without the Internet connection
helm upgrade --install hummix ./hummix -f values-hummix.yaml --timeout=30m --wait [-n namespace]
|
Step 3: Restore databases
- Restoring from backup should be done to empty databases and S3 storage. So clean them with the
--cleanup-databaseskey. - Restore the databases from the last backup:
hummix-backupper restore <<db-type>>
Where <<db-type>> is the name of the database for which you want to get a list of backups. Value options:
mongospecifies MongoDB.postgresspecifies PostgreSQL.s3specifies S3 storage.allspecifies all databases (MongoDB, PostgreSQL, S3).
To specify two databases, you can combine the mongo, postgres, and s3 values by separating them with commas. For example, postgres,s3 or mongo,postgres.