db migrate etcd-to-local

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

Synopsis

Etcd To Local

This command will move data from the etcd database configured at TORERO_STORE_ETCD_HOSTS to the etcd database located at TORERO_APPLICATION_WORKING_DIR/torero.db. Ensure that all TORERO_STORE_ETCD configuration variables are properly set to ensure that this command will function.

It is important to consider that all database keys include your particular cluster ID set by TORERO_APPLICATION_CLUSTER_ID. E.g. A database record for a python script will have a key that resembles the following: torero/cluster_1/services/v1/python-script/my-script

torero 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.

>_ torero 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 use of the --force flag.

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

View Possible Changes

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

>_ torero db migrate etcd-to-local --check
>_ torero 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

SEE ALSO