Environment Migration

CLI Tutorial: Environment Migration

Use the platform CLI to move an application to another environment region, select infrastructure with more suitable conditions or location, or distribute cloned environments across different hardware sets for improved availability.

Get Available Regions

1Request the region list

Run the getregions method with a search filter to shorten the output and show the values required for migration.

~/jelastic/environment/control/getregions | sed -rne '/(uniqueName|isEnabled|displayName)/{/Name/,/isEnabled/p}'
CLI output with available environment regions
Review region names, unique identifiers, and availability status.
  • displayName is the region name shown in the dashboard.
  • uniqueName is the region identifier required by the migration commands.
  • isEnabled: true indicates that the region is available for the current account.
The first output level contains general data-center information. The region parameters required for migration are displayed one level below and are shifted to the right.

Check Migration Possibility

Before starting the migration, verify that the selected environment can be moved to the target region.

~/jelastic/environment/control/checkmigrationpossibility --envName {env_name} --hardwareNodeGroup {region_id}
{env_name} Name of the environment that should be relocated.
{region_id} Target region’s uniqueName value obtained from the previous step.
Check environment migration possibility through CLI
Verify migration compatibility before starting the relocation.
Recommended: Do not skip the compatibility check. It helps identify whether the target region can support the environment before the migration begins.

Run the Migration

After confirming the target region and migration possibility, execute:

~/jelastic/environment/control/migrate --envName {env_name} --hardwareNodeGroup {region_id} --isOnline {true/false}
Migrate an environment through CLI
Start the environment migration with the selected target region and migration mode.

Online and Offline Modes

--isOnline true Uses live migration mode.
--isOnline false Uses offline migration mode.
Choose the migration mode according to the application’s availability requirements and the capabilities of the source and target infrastructure.

Migration Completion

The exact migration duration depends on the environment content and size. After the operation completes, the application is relocated to the selected environment region.

  • Wait until the CLI operation completes.
  • Confirm that the environment is running in the target region.
  • Test application availability and critical services.
  • Review networking, public IP, domain, storage, and integration settings when applicable.

What’s next?