az cosmosdb copy
Note
This reference is part of the cosmosdb-preview extension for the Azure CLI (version 2.17.1 or higher). The extension will automatically install the first time you run an az cosmosdb copy command. Learn more about extensions.
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage container copy job.
Commands
Name | Description | Type | Status |
---|---|---|---|
az cosmosdb copy cancel |
Cancel a container copy job. |
Extension | Preview |
az cosmosdb copy complete |
Completes an online container copy job. |
Extension | Preview |
az cosmosdb copy create |
Creates a container copy job. |
Extension | Preview |
az cosmosdb copy list |
Get a container copy job. |
Extension | Preview |
az cosmosdb copy pause |
Pause a container copy job. |
Extension | Preview |
az cosmosdb copy resume |
Resume a container copy job. |
Extension | Preview |
az cosmosdb copy show |
Get a container copy job. |
Extension | Preview |
az cosmosdb copy cancel
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Cancel a container copy job.
az cosmosdb copy cancel --account-name
--job-name
--resource-group
Examples
Cancel job j1
az cosmosdb copy cancel -g "rg1" --account-name "acc1" --job-name "j1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of the container copy job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy complete
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Completes an online container copy job.
az cosmosdb copy complete --account-name
--job-name
--resource-group
Examples
Complete job j1
az cosmosdb copy complete -g "rg1" --account-name "acc1" --job-name "j1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of the container copy job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy create
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Creates a container copy job.
az cosmosdb copy create --resource-group
--src-account
[--dest-account]
[--dest-cassandra]
[--dest-mongo]
[--dest-mongo-vcore]
[--dest-nosql]
[--job-name]
[--mode]
[--src-cassandra]
[--src-mongo]
[--src-nosql]
Examples
Copy Azure Cosmos DB API for NoSQL container in same account
az cosmosdb copy create -g "rg1" --job-name "j1" --src-account "acc1" --dest-account "acc1" --src-nosql database=db1 container=c1 --dest-nosql database=db2 container=c2
Copy Azure Cosmos DB API for NoSQL container in different account
az cosmosdb copy create -g "rg1" --job-name "j1" --src-account "acc1" --dest-account "acc2" --src-nosql database=db1 container=c1 --dest-nosql database=db2 container=c2
Copy Azure Cosmos DB API for Apache Cassandra table
az cosmosdb copy create -g "rg1" --job-name "j1" --src-account "acc1" --dest-account "acc1" --src-cassandra keyspace=k1 table=t1 --dest-cassandra keyspace=k2 table=t2
Copy Azure Cosmos DB API for MongoDB collection
az cosmosdb copy create -g "rg1" --job-name "j1" --src-account "acc1" --dest-account "acc1" --src-mongo database=d1 collection=c1 --dest-mongo database=d2 collection=c2
Copy Azure Cosmos DB API from MongoDB(RU) collection to Mongo(vCore) collection
az cosmosdb copy create -g "rg1" --job-name "j1" --src-account "acc1" --src-mongo database=d1 collection=c1 --dest-mongo-vcore database=d2 collection=c2 connectionStringKeyVaultUri=<link_to_Azure_KeyVault_secret>
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure Cosmos DB source database account.
Optional Parameters
Name of the Azure Cosmos DB destination database account.
Destination table.
Usage: --dest-cassandra keyspace=XX table=XX' keyspace: Keyspace name. table: Table name.
Destination collection.
Usage: --dest-mongo database=XX collection=XX' database: Database name. collection: Collection name.
Destination Mongo(vCore) collection.
Usage: --dest-mongo-vcore database=XX collection=XX connectionStringKeyVaultUri=XX' database: Database name. collection: Collection name. connectionStringKeyVaultUri: Link to Azure KeyVault secret containing connection string.
Destination container.
Usage: --dest-nosql database=XX container=XX' database: Database name. container: Container name.
Name of the Data Transfer Job. A random job name will be generated if not passed.
Copy Mode (Online / Offline).
Source table.
Usage: --src-cassandra keyspace=XX table=XX' keyspace: Keyspace name. table: Table name.
Source collection.
Usage: --src-mongo database=XX collection=XX' database: Database name. collection: Collection name.
Source container.
Usage: --src-nosql database=XX container=XX' database: Database name. container: Container name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy list
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a container copy job.
az cosmosdb copy list --account-name
--resource-group
Examples
List all jobs
az cosmosdb copy list -g "rg1" --account-name "acc1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy pause
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Pause a container copy job.
az cosmosdb copy pause --account-name
--job-name
--resource-group
Examples
Pause job j1
az cosmosdb copy pause -g "rg1" --account-name "acc1" --job-name "j1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of the container copy job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy resume
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Resume a container copy job.
az cosmosdb copy resume --account-name
--job-name
--resource-group
Examples
Resume job j1
az cosmosdb copy resume -g "rg1" --account-name "acc1" --job-name "j1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of the container copy job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az cosmosdb copy show
Command group 'cosmosdb copy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a container copy job.
az cosmosdb copy show --account-name
--job-name
--resource-group
Examples
Show details of job j1
az cosmosdb copy show -g "rg1" --account-name "acc1" --job-name "j1"
Required Parameters
Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.
Name of the container copy job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.