db migrate etcd-to-local
  • 12 Nov 2024
  • Dark
    Light
  • PDF

db migrate etcd-to-local

  • Dark
    Light
  • PDF

Article summary

iagctl db migrate etcd-to-local

Allows a user to migrate data from an etcd database to a local database

Synopsis

This command will move data from the etcd database configured at GATEWAY_STORE_ETCD_HOSTS to the etcd database located at GATEWAY_APPLICATION_WORKING_DIR/gateway.db.

Ensure that all GATEWAY_STORE_ETCD_* configuration variables are properly set to ensure that this command will function. Moreover, all database keys will include the cluster ID set by GATEWAY_APPLICATION_CLUSTER_ID. For example, a database record for a python script will have a key that resembles the following: gateway/cluster_1/services/v1/python-script/my-script.

iagctl db migrate etcd-to-local [flags]

Examples

Migrate Non-Conflicting Records

Moves non conflicting records from the etcd to a local database. If a record with the same key already exists on the local database, it will be skipped to avoid overwriting any existing data.

>_ iagctl db migrate etcd-to-local

Migrate All Records

Moves all records from an etcd database to a local database. If a record with the same key already exists on the local database it will be overwritten due to the --force flag.

>_ iagctl db migrate etcd-to-local --force

View Possible Changes

If the --check flag is used, no data will be moved. Gateway will only display a table with information the data that will be migrated or skipped/replaced depending on the use of the --force flag.

>_ iagctl db migrate etcd-to-local --check
>_ iagctl db migrate etcd-to-local --check --force

Options

--check   Displays a report of what data would be migrated but causes no data to actually be moved.
--force   If a conflicting record already exists on the local database, replace it.
-h, --help    Help for etcd-to-local

Options Inherited from Parent Commands

--config string   Path to the configuration file
--raw             Displays the result of the command in its raw format
--verbose         Enable verbose output

CLI References

See related db commands:

For all CLI commands see → Command References Index


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.