Skip to main content

tcb db nosql restore

Restore document database collections to a point in time.

Usage​

tcb db nosql restore --time <time> --tables '<json>' [options]

Parameters​

ParameterRequiredDescriptionDefault
--time <time>YesTarget restore time—
--tables <json>YesJSON array mapping source collections to target collections—
--instanceId <id>NoMongoConnector instance ID—
--databaseName <name>NoMongoConnector database name—
-e, --env-id <envId>NoEnvironment ID—

--tables format:

[{ "OldTableName": "source collection", "NewTableName": "target collection" }]

Full restore example​

# 1. Check the restorable time range
tcb db nosql restore-time -e my-env-id

# 2. Check which collections are restorable at that time
tcb db nosql restore-tables --time "2026-03-10 14:00:00" -e my-env-id

# 3. Run the restore, writing into a new collection name
tcb db nosql restore \
--time "2026-03-10 14:00:00" \
--tables '[{"OldTableName":"orders","NewTableName":"orders_restored"}]' \
-e my-env-id

# 4. Check the restore task progress
tcb db nosql restore-task -e my-env-id