Migrating your data
The data migration steps on this page are applicable for migration from 5.x.x to 6.1.0, 6.2.0, 6.3.0.
Before you begin
Before migrating your data, ensure you have completed the prerequisites and built and deployed the migration pod:
- For migration to 6.1.0 or 6.2.0, refer to Configuring prerequisites for migration and Building and deploying the migration pod.
- For migration to 6.3.0 (untethered → untethered or tethered → tethered), refer to Configuring prerequisites for migration within the same deployment mode and Building and deploying the migration pod for same deployment modes.
Step 1: Migrating configuration data
In 6.0.0, the kubectl exec command used to log in to the migration-container includes a <namespace_name for 5.x> placeholder that you replace with your actual namespace. Starting in 6.1.0, this placeholder was replaced with default, which you update with the namespace used by your Local Edition 5.x.x deployment.
Migrating the configuration data from 5.x.x to 6.1.0, 6.2.0, or 6.3.0 is a two-step procedure:
Exporting the configuration data to an SQL file
-
Log in to the
migration-containerin themigration-pod. Updatedefaultwith the namespace used by Local Edition 5.x.x, and then run:kubectl exec -it migration-pod --namespace default -- /bin/bash -
Export the configuration data to the Local Edition 6.x.x database by running:
migrate.py --export_config
Importing the SQL file to the Local Edition database
-
Log in to the
migration-containerin themigration-pod. Updatedefaultwith the namespace used by Local Edition 5.x.x, and then run:kubectl exec -it migration-pod --namespace default -- /bin/bash-
Install the screen shell in the
migration-podby running:apt-get install screen -yWe recommend running this command in the
screenshell so that even if themigration-podshell times out, the configuration import will not be affected.
-
-
Import the configuration data to the Local Edition 6.x.x database by running:
migrate.py --import_config
Local Edition 5.x.x uses the America/Los Angeles timezone. It is updated to UTC in Local Edition 6.1.0 or 6.2.0.
You can update the date and time in the configuration data using this command: migrate.py --update_timezone
Step 2: Migrating tokens
Migrating the tokens from 5.x.x to 6.1.0, 6.2.0, or 6.3.0 is a two-step procedure:
Exporting tokens
-
Log in to the
migration-containerin themigration-pod. Updatedefaultwith the namespace used by Local Edition 5.x.x, and then run:kubectl exec -it migration-pod --namespace default -- /bin/bash -
Export the tokens to the Local Edition 6.1.0 or 6.2.0 database by running:
migrate.py --export_tokens
Importing tokens
-
Log in to the
migration-containerin themigration-pod. Updatedefaultwith the namespace used by Local Edition 5.x.x, and then run:kubectl exec -it migration-pod --namespace default -- /bin/bash-
Install the screen shell in the
migration-podby running:apt-get install screen -yWe recommend running this command in a
screenshell so that even if themigration-podshell times out, the token import will not be affected. -
Start a
screensession, and then substitutemigratetokenswith any session name:screen -S migratetokens
-
-
After the screen session begins, import the exported tokens:
migrate.py --import_tokensIf the screen session gets disconnected or closed, run the following command to connect to the created session:
screen -x migratetokens
Step 3: Migrating CMS
A new migration utility has been created to migrate the CMS to Local Edition 6.x.x. The process applies when migrating CMS data from Local Edition versions 5.3.x, 5.4.x, 5.5.x, and 5.6.x.
Points to consider for the CMS migration:
- Only the latest published CMS objects can be migrated.
- Only the active CMS objects can be migrated.
- If an unpublished folder contains published objects, that folder is also published.
The content_objects and content_objects_role tables in MySQL 8 must be empty. Run the following command:
migrate.py --migrate_cms
Next steps: Perform post-migration
After completing the data migration, proceed with the post-migration steps. Refer to Performing post-migration steps for more information.