If you are using network file storage (NFS) or dynamic storage for both your
anaconda-storage
and anaconda-persistence
volumes within your Gravity
cluster, it is not necessary to perform these steps, as you can unmount these
volumes from your Gravity cluster and remount them on your BYOK8s cluster. An
Anaconda implementation team member will guide you through this process, if
necessary.Have all users save their work, stop any open sessions and deployments, and
log out of the platform so no data is lost during the migration process.
Prerequisites
The following conditions must be met to complete this task successfully:- You must have
sudo
access. - The
jq
conda package must be installed in your base environment.
- Optionally, you can install this ae5-conda environment, which already contains the necessary packages.
Install the backup and restore tool
Migrating your data from Gravity to BYOK8s involves using the Workbench backup and restore tool, which you can obtain using conda.If you chose to install the
ae5-conda
environment listed in the
prerequisites, skip ahead to verify your
installation.Standard environment
For a standard environment, you can install theae5_backup_restore
package into your base conda environment by opening a terminal and running the following command:
Air-gapped environment
For air-gapped networks, download the latestae5_conda
installer file and move it to your master node.
Set the installer file to be executable, then install the ae5_conda
environment by running the following commands:
Verify your installation
Verify you’ve successfully installed the backup and restore tool by running the following command:Run the backup script
When running the backup script, include the--config-db
or -c
command line argument to instruct the backup script to only capture your Workbench configuration data. User and project data is migrated separately later in this process.
To create a backup file of your cluster in your current working directory, run the command:
YYYYMMDDHHMM is the format for the date timestamp of your backup data.
Migrate user data
Before you can migrate user data, you must prevent users from making edits to the disk.- Open a terminal.
- SSH into your Workbench master node.
-
Enter Gravity by running the following command:
-
Scale down the Anaconda Platform pods, identified by their
ap-
prefix, by running the following command: -
Verify that the
ap-
prefixed pods have stopped by running the following command: -
Once the
ap-
prefixed pods have stopped, migrate your user data by moving the following directories into the new cluster:/opt/anaconda/storage/git/repositories/anaconda
/opt/anaconda/storage/projects
This can be done by either directly mounting the/opt/anaconda/storage
volume onto a workstation with access to the BYOK8s cluster, or by compressing the directories separately, then copying them into the storage pod.Migrating user data requires that both the Gravity and BYOK8s clusters have identical UID/GID permissions set. If permissions are not correctly aligned, your user data will not migrate.
/opt/anaconda/storage
volume onto a workstation with access to the BYOK8s cluster, move both directories directly into place on top of the pre-existing directories on the BYOK8s cluster.
If you are unable to directly mount the /opt/anaconda/storage
volume, you will instead need to copy both tarballs you have taken to the /tmp
directory by running the following commands:
/tmp
, exec into the pods, then move them into place by running the following commands:
Run the restore script
Restoring to a different host without a hostname change
Use this method if you are migrating to a cluster with a URL that differs from the URL of your Gravity cluster. Restored data:- Kubernetes secrets (non-ssl)
- Postgres
- configmaps
- SSL certs
- Secrets
- Hostname
- Ingress