Skip to content

Commit 0a2de59

Browse files
committed
Implement @abhijitpai change requests
1 parent 2c977ea commit 0a2de59

File tree

3 files changed

+54
-52
lines changed

3 files changed

+54
-52
lines changed

articles/cosmos-db/how-to-container-copy.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,42 @@ ms.author: shwetn
99
---
1010

1111
# Create and manage intra-account container copy jobs in Azure Cosmos DB (Preview)
12+
[!INCLUDE[appliesto-sql-cassandra-api](includes/appliesto-sql-cassandra-api.md)]
1213

13-
[!INCLUDE[appliesto-sql-api](includes/appliesto-sql-api.md)]
14-
[!INCLUDE[appliesto-cassandra-api](includes/appliesto-cassandra-api.md)]
14+
[Container copy jobs](intra-account-container-copy.md) creates offline copies of collections within an Azure Cosmos DB account.
1515

16-
[Container copy jobs](./intra-account-container-copy.md) allow to create offline copies of collections within an Azure Cosmos DB account
16+
This article describes how to create, monitor, and manage intra-account container copy jobs using Azure CLI commands.
1717

18-
This article describes you to create, monitor and manage intra-account container copy jobs using Azure CLI commands.
18+
## Set shell variables
19+
20+
First, set all of the variables that each individual script will use.
21+
22+
```azurecli-interactive
23+
$accountName = "<cosmos-account-name>"
24+
$resourceGroup = "<resource-group-name>"
25+
$jobName = ""
26+
$sourceDatabase = ""
27+
$sourceContainer = ""
28+
$destinationDatabase = ""
29+
$destinationContainer = ""
30+
```
1931

2032
## Create an intra-account container copy job for SQL API account
2133

2234
Create a job to copy a container within an Azure Cosmos DB SQL API account:
2335

2436
```azurecli-interactive
25-
26-
$cosmosdbaccountname = "cosmosDBAccountName"
27-
$rg = "resourceGroupName"
28-
$copyJobName = ""
29-
$sourceKeySpace = ""
30-
$sourceTable = ""
31-
$destinationKeySpace = ""
32-
$destinationTable = ""
33-
34-
az cosmosdb dts copy -g $rg --job-name $jobName --account-name $cosmosdbaccountname \
35-
--source-sql-container database=$sourceContainer container=$sourceDb \
36-
--dest-sql-container database=$destinationContainer container=$destinationDb
37+
az cosmosdb dts copy --resource-group $resourceGroup --job-name $jobName --account-name $accountName \
38+
--source-sql-container database=$sourceDatabase container=$sourceContainer \
39+
--dest-sql-container database=$destinationDatabase container=$destinationContainer
3740
```
3841

3942
## Create intra-account container copy job for Cassandra API account
4043

4144
Create a job to copy a container within an Azure Cosmos DB Cassandra API account:
4245

4346
```azurecli-interactive
44-
45-
$cosmosdbaccountname = "cosmosDBAccountName"
46-
$rg = "resourceGroupName"
47-
$copyJobName = ""
48-
$sourceKeySpace = ""
49-
$sourceTable = ""
50-
$destinationKeySpace = ""
51-
$destinationTable = ""
52-
53-
az cosmosdb dts copy -g $rg --job-name $jobName --account-name $cosmosdbaccountname \
47+
az cosmosdb dts copy --resource-group $resourceGroup --job-name $jobName --account-name $accountName \
5448
--source-cassandra-table keyspace=$sourceKeySpace table=$sourceTable \
5549
--dest-cassandra-table keyspace=$destinationKeySpace table=$destinationTable
5650
```
@@ -60,29 +54,33 @@ az cosmosdb dts copy -g $rg --job-name $jobName --account-name $cosmosdbaccountn
6054
View the progress and status of a copy job:
6155

6256
```azurecli-interactive
63-
az cosmosdb dts show --account-name $cosmosdbaccountname -g $rg --job-name $copyJobname
57+
az cosmosdb dts show --account-name $accountName --resource-group $resourceGroup --job-name $jobName
6458
```
6559

6660
## List all the container copy jobs created in an account
6761

6862
To list all the container copy jobs created in an account:
6963

7064
```azurecli-interactive
71-
az cosmosdb dts list --account-name $cosmosdbaccountname -g $rg
65+
az cosmosdb dts list --account-name $accountName --resource-group $resourceGroup
7266
```
7367

7468
## Pause a container copy job
7569

7670
In order to pause an ongoing container copy job, you may use the command:
7771

7872
```azurecli-interactive
79-
az cosmosdb dts pause --account-name $cosmosdbaccountname -g $rg --job-name $copyJobname
73+
az cosmosdb dts pause --account-name $accountName --resource-group $resourceGroup --job-name $jobName
8074
```
8175

8276
## Resume a container copy job
8377

8478
In order to resume an ongoing container copy job, you may use the command:
8579

8680
```azurecli-interactive
87-
az cosmosdb dts resume --account-name $cosmosdbaccountname -g $rg --job-name $copyJobname
88-
```
81+
az cosmosdb dts resume --account-name $accountName --resource-group $resourceGroup --job-name $jobName
82+
```
83+
84+
## Next steps
85+
86+
- For more information about intra-account container copy jobs, see [Container copy jobs](intra-account-container-copy.md).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPLIES TO: :::image type="icon" source="../media/applies-to/yes.png" border="false":::SQL API :::image type="icon" source="../media/applies-to/yes.png" border="false":::Cassandra API

articles/cosmos-db/intra-account-container-copy.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,24 @@ ms.author: shwetn
99
---
1010

1111
# Intra-account container copy jobs (Preview)
12-
13-
[!INCLUDE[appliesto-sql-api](includes/appliesto-sql-api.md)]
14-
[!INCLUDE[appliesto-cassandra-api](includes/appliesto-cassandra-api.md)]
12+
[!INCLUDE[appliesto-sql-cassandra-api](includes/appliesto-sql-cassandra-api.md)]
1513

1614
You can perform offline container copy within an Azure Cosmos DB account using container copy jobs.
1715

18-
You may need to copy data within your Azure Cosmos DB account if you want to achieve either of these scenarios:
16+
You may need to copy data within your Azure Cosmos DB account if you want to achieve any of these scenarios:
1917

2018
* Copy all items from one container to another.
21-
* Change the [granularity at which throughput is provisioned - from database to container](./set-throughput.md) and vice-versa.
22-
* Change the [partition key](./partitioning-overview.md#choose-partitionkey) of a container.
23-
* Update the [unique keys](./unique-keys.md) for a container.
19+
* Change the [granularity at which throughput is provisioned - from database to container](set-throughput.md) and vice-versa.
20+
* Change the [partition key](partitioning-overview.md#choose-partitionkey) of a container.
21+
* Update the [unique keys](unique-keys.md) for a container.
2422
* Rename a container/database.
2523
* Adopt new features that are only supported on new containers.
2624

27-
Intra-account container copy jobs can be currently [created and managed using CLI commands](./how-to-copy-container.md).
25+
Intra-account container copy jobs can be currently [created and managed using CLI commands](how-to-container-copy.md).
26+
27+
## Getting started
28+
29+
To get started using container copy jobs, enroll in the preview by filing a support ticket in the [Azure portal](https://portal.azure.com).
2830

2931
## How does intra-account container copy work?
3032

@@ -37,24 +39,28 @@ Intra-account container copy jobs perform offline data copy using the source con
3739
* The platform may de-allocate the instances if they're idle for >15 mins.
3840

3941
> [!NOTE]
40-
> We currently only support offline container copy. So, we strongly recommend to stop performing any operations on the source container prior to beginning the container copy. \
41-
> Item deletions and updates done on the source container after beginning the copy job would not be captured. Hence, continuing to perform operations on the source container while the container job is in progress may result in data missing on the target container.
42+
> We currently only support offline container copy. So, we strongly recommend to stop performing any operations on the source container prior to beginning the container copy.
43+
> Item deletions and updates done on the source container after beginning the copy job may not be captured. Hence, continuing to perform operations on the source container while the container job is in progress may result in data missing on the target container.
4244
4345
## Overview of steps needed to do a container copy
4446

4547
1. Stop the operations on the source container by pausing the application instances or any clients connecting to it.
46-
2. [Create the container copy job](./how-to-copy-container.md).
47-
3. [Monitor the progress of the container copy job](./how-to-copy-container.md#monitor-the-progress-of-container-copy-job) and wait until it's completed.
48+
2. [Create the container copy job](how-to-container-copy.md).
49+
3. [Monitor the progress of the container copy job](how-to-container-copy.md#monitor-the-progress-of-a-container-copy-job) and wait until it's completed.
4850
4. Resume the operations by appropriately pointing the application or client to the source or target container copy as intended.
4951

5052
## Factors affecting the rate of container copy job
5153

5254
The rate of container copy job progress is determined by these factors:
5355

5456
* Source container/database throughput setting.
57+
5558
* Target container/database throughput setting.
56-
* Server-side compute instances allocated to the Azure Cosmos DB account for the performing the data transfer.\
57-
The default is two 4-vCPU 16-GB server-side instances per account, available for free. You may opt to sign up for paid [larger SKUs](#large-skus-preview) preview.
59+
60+
* Server-side compute instances allocated to the Azure Cosmos DB account for the performing the data transfer.
61+
62+
> [!IMPORTANT]
63+
> The default SKU offers two 4-vCPU 16-GB server-side instances per account. You may opt to sign up for [larger SKUs](#large-skus-preview) in preview.
5864
5965
## FAQs
6066

@@ -64,15 +70,15 @@ Container copy jobs are currently supported on best-effort basis. We don't provi
6470

6571
### Can I create multiple container copy jobs within an account?
6672

67-
Yes, you can create multiple jobs within the same account. The jobs will run consecutively. You can [list all the jobs](./how-to-copy-container.md#list-all-the-container-copy-jobs-created-in-an-account) created within an account and monitor their progress.
73+
Yes, you can create multiple jobs within the same account. The jobs will run consecutively. You can [list all the jobs](how-to-container-copy.md#list-all-the-container-copy-jobs-created-in-an-account) created within an account and monitor their progress.
6874

6975
### Can I copy an entire database within the Azure Cosmos DB account?
7076

7177
You'll have to create a job for each collection in the database.
7278

7379
### I have an Azure Cosmos DB account with multiple regions. In which region will the container copy job run?
7480

75-
The container copy job will run in the write region. If there are accounts configured with multi-region writes, the job will run in the first region from the list.
81+
The container copy job will run in the write region. If there are accounts configured with multi-region writes, the job will run in one of the regions from the list.
7682

7783
### What happens to the container copy jobs when the account's write region changes?
7884

@@ -82,11 +88,8 @@ The account's write region may change in the rare scenario of a region outage or
8288

8389
If you want to run the container copy jobs faster, you may do so by adjusting one of the [factors that affect the rate of the copy job](#factors-affecting-the-rate-of-container-copy-job). In order to adjust the configuration of the server-side compute instances, you may sign up for "Large SKU support for container copy" preview.
8490

85-
This preview will allow you to choose larger SKUs sizes for the server-side instances. You can also choose a node count of up to 5 for these instances.
86-
87-
> [!NOTE]
88-
> Large SKU sizes are payable.
91+
This preview will allow you to choose larger a SKU size for the server-side instances. Large SKU sizes are billable at a higher rate. You can also choose a node count of up to 5 of these instances.
8992

9093
## Next Steps
9194

92-
You can learn about [how to create, monitor and manage container copy jobs within Azure Cosmos DB account using CLI commands](./how-to-copy-container.md).
95+
- You can learn about [how to create, monitor and manage container copy jobs within Azure Cosmos DB account using CLI commands](how-to-container-copy.md).

0 commit comments

Comments
 (0)