npm install -g uucloud-db-translator
uucloud-db-translator <command> <command parameters>
help Display this help.
translateDatabase Performs DB translation (Does hard replace for whole document).
translateDatabaseForKeys Performs DB translation for specific keys in the documents only.
translateJson Performs DB export translation.
translateJson
, translateDatabase
, translateDatabaseForKeys
, help
commands. All these can be used as default commands without providing --command argument.
File path to the configuration object.
Databases to be translated.
Collections to be translated
Databases to be removed from the translation.
Collections to be removed from the translation.
Applicable for translateJson
command. File path to the JSON DB export which will be translated.
{
"mongodb": {
"connectionString": "", // whole connection string, if defined, it has priority over the individual values (host, port, etc...)
"host": "...",
"port": "...",
"username": "...",
"password": "...",
"options": {
"chunkSize": 5000
}
},
"translation": [
[
"old-value",
"new-value"
]
],
"keys": [
"keyName" // must be specified in case of translateDatabaseForKeys command
]
}
logs are automatically stored to the %HOME%/.uucloud-db-translator/logs
folder