Skip to content

Commit 0252b82

Browse files
committed
updated intra-account container copy docs
1 parent 63e1cdc commit 0252b82

File tree

2 files changed

+38
-25
lines changed

2 files changed

+38
-25
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ ms.reviewer: sidandrews
1515

1616
[Container copy jobs](intra-account-container-copy.md) help create offline copies of containers within an Azure Cosmos DB account.
1717

18-
This article describes how to create, monitor, and manage intra-account container copy jobs using Azure PowerShell or CLI commands.
18+
This article describes how to create, monitor, and manage intra-account container copy jobs using Azure CLI commands.
1919

2020
## Prerequisites
2121

22-
* You may use the portal [Cloud Shell](/azure/cloud-shell/quickstart?tabs=powershell) to run container copy commands. Alternately, you may run the commands locally; make sure you have [Azure CLI](/cli/azure/install-azure-cli) or [Azure PowerShell](/powershell/azure/install-az-ps-msi) downloaded and installed on your machine.
22+
* You may use the portal [Cloud Shell](/azure/cloud-shell/quickstart?tabs=powershell) to run container copy commands. Alternately, you may run the commands locally; make sure you have [Azure CLI](/cli/azure/install-azure-cli) downloaded and installed on your machine.
2323
* Currently, container copy is only supported in [these regions](intra-account-container-copy.md#supported-regions). Make sure your account's write region belongs to this list.
2424

2525

2626
## Install the Azure Cosmos DB preview extension
2727

2828
This extension contains the container copy commands.
2929

30-
```azurepowershell-interactive
30+
```azurecli-interactive
3131
az extension add --name cosmosdb-preview
3232
```
3333

3434
## Set shell variables
3535

3636
First, set all of the variables that each individual script uses.
3737

38-
```azurepowershell-interactive
38+
```azurecli-interactive
3939
$resourceGroup = "<resource-group-name>"
4040
$accountName = "<cosmos-account-name>"
4141
$jobName = ""
@@ -49,7 +49,7 @@ $destinationContainer = ""
4949

5050
Create a job to copy a container within an Azure Cosmos DB API for NoSQL account:
5151

52-
```azurepowershell-interactive
52+
```azurecli-interactive
5353
az cosmosdb dts copy `
5454
--resource-group $resourceGroup `
5555
--account-name $accountName `
@@ -62,7 +62,7 @@ az cosmosdb dts copy `
6262

6363
Create a job to copy a container within an Azure Cosmos DB API for Cassandra account:
6464

65-
```azurepowershell-interactive
65+
```azurecli-interactive
6666
az cosmosdb dts copy `
6767
--resource-group $resourceGroup `
6868
--account-name $accountName `
@@ -76,7 +76,7 @@ az cosmosdb dts copy `
7676

7777
View the progress and status of a copy job:
7878

79-
```azurepowershell-interactive
79+
```azurecli-interactive
8080
az cosmosdb dts show `
8181
--resource-group $resourceGroup `
8282
--account-name $accountName `
@@ -87,7 +87,7 @@ az cosmosdb dts show `
8787

8888
To list all the container copy jobs created in an account:
8989

90-
```azurepowershell-interactive
90+
```azurecli-interactive
9191
az cosmosdb dts list `
9292
--resource-group $resourceGroup `
9393
--account-name $accountName
@@ -97,7 +97,7 @@ az cosmosdb dts list `
9797

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

100-
```azurepowershell-interactive
100+
```azurecli-interactive
101101
az cosmosdb dts pause `
102102
--resource-group $resourceGroup `
103103
--account-name $accountName `
@@ -108,7 +108,7 @@ az cosmosdb dts pause `
108108

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

111-
```azurepowershell-interactive
111+
```azurecli-interactive
112112
az cosmosdb dts resume `
113113
--resource-group $resourceGroup `
114114
--account-name $accountName `

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

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ The rate of container copy job progress is determined by these factors:
7070
> [!IMPORTANT]
7171
> The default SKU offers two 4-vCPU 16-GB server-side instances per account.
7272
73+
## Limitations
74+
75+
### Preview eligibility criteria
76+
77+
Container copy jobs don't work with accounts having following capabilities enabled. You will need to disable these features before running the container copy jobs.
78+
79+
- [Disable local auth](https://learn.microsoft.com/azure/cosmos-db/how-to-setup-rbac#use-azure-resource-manager-templates)
80+
- [Private endpoint / IP Firewall enabled](https://learn.microsoft.com/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure). You will need to provide access to connections within public Azure datacenters to run container copy jobs.
81+
- [Merge partition](https://learn.microsoft.com/azure/cosmos-db/merge).
82+
83+
84+
### Account Configurations
85+
86+
- The time-to-live (TTL) setting is not adjusted in the destination container. As a result, if a document has not expired in the source container, it will start its countdown anew in the destination container.
87+
88+
7389
## FAQs
7490

7591
### Is there an SLA for the container copy jobs?
@@ -92,11 +108,6 @@ The container copy job runs in the write region. If there are accounts configure
92108

93109
The account's write region may change in the rare scenario of a region outage or due to manual failover. In such a scenario, incomplete container copy jobs created within the account would fail. You would need to recreate these failed jobs. Recreated jobs would then run in the new (current) write region.
94110

95-
### Why is a new database *__datatransferstate* created in the account when I run container copy jobs? Am I being charged for this database?
96-
97-
* *__datatransferstate* is a database that is created while running container copy jobs. This database is used by the platform to store the state and progress of the copy job.
98-
* The database uses manual provisioned throughput of 800 RUs. You are charged for this database.
99-
* Deleting this database removes the container copy job history from the account. It can be safely deleted once all the jobs in the account have completed, if you no longer need the job history. The platform doesn't clean up the *__datatransferstate* database automatically.
100111

101112
## Supported regions
102113

@@ -126,19 +137,10 @@ Currently, container copy is supported in the following regions:
126137
Make sure the target container is created before running the job as specified in the [overview section.](#overview-of-steps-needed-to-do-container-copy)
127138

128139
```output
129-
"code": "500",
140+
"code": "404",
130141
"message": "Response status code does not indicate success: NotFound (404); Substatus: 1003; ActivityId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; Reason: (Message: {\"Errors\":[\"Owner resource does not exist\"]
131142
```
132143
133-
* Error - Shared throughput database creation isn't supported for serverless accounts
134-
135-
Job creation on serverless accounts may fail with the error *"Shared throughput database creation isn't supported for serverless accounts"*.
136-
As a work-around, create a database called *__datatransferstate* manually within the account and try creating the container copy job again.
137-
138-
```output
139-
ERROR: (BadRequest) Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; Reason: (Shared throughput database creation is not supported for serverless accounts.
140-
```
141-
142144
* Error - (Request) is blocked by your Cosmos DB account firewall settings.
143145
144146
The job creation request could be blocked if the client IP isn't allowed as per the VNet and Firewall IPs configured on the account. In order to get past this issue, you need to [allow access to the IP through the Firewall setting](how-to-configure-firewall.md). Alternately, you may set **Accept connections from within public Azure datacenters** in your firewall settings and run the container copy commands through the portal [Cloud Shell](/azure/cloud-shell/quickstart?tabs=powershell).
@@ -147,6 +149,17 @@ Currently, container copy is supported in the following regions:
147149
InternalServerError Request originated from IP xxx.xxx.xxx.xxx through public internet. This is blocked by your Cosmos DB account firewall settings. More info: https://aka.ms/cosmosdb-tsg-forbidden
148150
ActivityId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
149151
```
152+
* Error - Error while getting resources for job.
153+
154+
This error can occur due to internal server issues. To resolve this issue, contact Microsoft support by raising a **New Support Request** from the Azure portal. Set the Problem Type as **'Data Migration'** and Problem subtype as **'Intra-account container copy'**.
155+
156+
```output
157+
"code": "500"
158+
"message": "Error while getting resources for job, StatusCode: 500, SubStatusCode: 0, OperationId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, ActivityId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
159+
```
160+
161+
162+
150163
151164
## Next steps
152165

0 commit comments

Comments
 (0)