emscli redirect
redirects an EMS instance to access a different EMS DB, for example, you can switch from a local DB to a remote DB or from one remote DB to another remote DB
emscli redirect [flags]
Options
--db_connection_pool_mode string The connection pool mode of the target remote database. Accepted values: low|medium|high
--db_host string The target remote database IP
--db_hosts string Comma-separated list of IP:PORT pairs for DB cluster nodes. Examples: --db_hosts 10.0.0.5:5432 or --db_hosts 10.0.0.5:5432,10.0.0.6,10.0.0.8:5434,...
--db_pass string The target remote database password
--db_port string The target remote database port
--db_preferred_dcs string The preferred data centers for EMS ha node (Optional), used together with --db_hosts. Examples: "--db_hosts="10.0.0.5:5432@Dc1,10.0.0.6:5636@Dc2,10.0.0.8:5434@Dc3,..." so --db_preferred_dcs Dc1,Dc2.
--db_prefix string The target remote database prefix
--db_user string The target remote database user
--debug Executes the 'direct' command in debug mode
-h, --help help for redirect
--is_paas Specifies if the EMS instance is being redirected to a PAAS target remote DB server (e.g. Azure, AWS)
--is_primary_node Specifies if the EMS instance will be the primary node in an EMS cluster after redirection to the target remote DB (or standalone if the target remote PostgreSQL server does not have any EMS DB deployed).
--is_secondary_node Specifies if the EMS instance will be the secondary node in an EMS cluster after redirection to the target remote DB
--yes Executes the 'direct' command in non-interactive mode
DB redirect behavior
The following table elaborates DB redirection behavior based on the primary and secondary node setting and current and target remote EMS DB version.
|
|
--is_primary_node --yes |
--is_secondary_node --yes |
|---|---|---|
|
Same EMS version for target remote DB and current EMS DB |
Redirect EMS instance to target remote DB with no upgrade. EMS instance will be the primary node. |
Redirect EMS instance to target remote DB with no upgrade. EMS instance will be a secondary node. |
|
Target remote DB has an older EMS version than current EMS DB |
Upgrade target remote EMS DB version and redirect EMS instance to it. |
The command exits with no upgrade on target remote DB and no redirection. |
|
Target remote DB has a newer EMS version than current EMS DB |
The command exits with no redirection. |
|
|
No EMS DB is installed on target remote DB server |
Deploy EMS DB on target remote DB server and redirect EMS instance to it. EMS instance will be a standalone. |
The command exits with no EMS DB deployment on target remote DB server and no redirection. |
See also
- emscli - EMS CLI - a tool for viewing and updating information about EMS