db migrate local-to-etcd
Allows a user to migrate data from a local database to an etcd database
Synopsis
Local To Etcd
This command will move data from the local database configured at TORERO_APPLICATION_WORKING_DIR/torero.db
to the
etcd database located at TORERO_STORE_ETCD_HOSTS
. 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 local-to-etcd [flags]
Examples
Migrate Non Conflicting Records
Moves non conflicting records from the local database to an etcd database. If a record with the same key already exists on the etcd database it will be skipped to avoid overwriting any existing data.
>_ torero db migrate local-to-etcd
Migrate All Records
Moves all records from a local database to an etcd database. If a record with the same key already exists on the etcd
database it will be overwritten due to the use of the --force
flag.
>_ torero db migrate local-to-etcd --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 local-to-etcd --check
>_ torero db migrate local-to-etcd --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 etcd database, replace it.
-h, --help help for local-to-etcd
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
- torero db migrate - Migrate between etcd and local file database storage options