You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/how-to-container-copy.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,27 +15,27 @@ ms.reviewer: sidandrews
15
15
16
16
[Container copy jobs](intra-account-container-copy.md) help create offline copies of containers within an Azure Cosmos DB account.
17
17
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.
19
19
20
20
## Prerequisites
21
21
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.
23
23
* 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.
24
24
25
25
26
26
## Install the Azure Cosmos DB preview extension
27
27
28
28
This extension contains the container copy commands.
29
29
30
-
```azurepowershell-interactive
30
+
```azurecli-interactive
31
31
az extension add --name cosmosdb-preview
32
32
```
33
33
34
34
## Set shell variables
35
35
36
36
First, set all of the variables that each individual script uses.
37
37
38
-
```azurepowershell-interactive
38
+
```azurecli-interactive
39
39
$resourceGroup = "<resource-group-name>"
40
40
$accountName = "<cosmos-account-name>"
41
41
$jobName = ""
@@ -49,7 +49,7 @@ $destinationContainer = ""
49
49
50
50
Create a job to copy a container within an Azure Cosmos DB API for NoSQL account:
51
51
52
-
```azurepowershell-interactive
52
+
```azurecli-interactive
53
53
az cosmosdb dts copy `
54
54
--resource-group $resourceGroup `
55
55
--account-name $accountName `
@@ -62,7 +62,7 @@ az cosmosdb dts copy `
62
62
63
63
Create a job to copy a container within an Azure Cosmos DB API for Cassandra account:
64
64
65
-
```azurepowershell-interactive
65
+
```azurecli-interactive
66
66
az cosmosdb dts copy `
67
67
--resource-group $resourceGroup `
68
68
--account-name $accountName `
@@ -76,7 +76,7 @@ az cosmosdb dts copy `
76
76
77
77
View the progress and status of a copy job:
78
78
79
-
```azurepowershell-interactive
79
+
```azurecli-interactive
80
80
az cosmosdb dts show `
81
81
--resource-group $resourceGroup `
82
82
--account-name $accountName `
@@ -87,7 +87,7 @@ az cosmosdb dts show `
87
87
88
88
To list all the container copy jobs created in an account:
89
89
90
-
```azurepowershell-interactive
90
+
```azurecli-interactive
91
91
az cosmosdb dts list `
92
92
--resource-group $resourceGroup `
93
93
--account-name $accountName
@@ -97,7 +97,7 @@ az cosmosdb dts list `
97
97
98
98
In order to pause an ongoing container copy job, you may use the command:
99
99
100
-
```azurepowershell-interactive
100
+
```azurecli-interactive
101
101
az cosmosdb dts pause `
102
102
--resource-group $resourceGroup `
103
103
--account-name $accountName `
@@ -108,7 +108,7 @@ az cosmosdb dts pause `
108
108
109
109
In order to resume an ongoing container copy job, you may use the command:
Copy file name to clipboardExpand all lines: articles/cosmos-db/intra-account-container-copy.md
+28-15Lines changed: 28 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,22 @@ The rate of container copy job progress is determined by these factors:
70
70
> [!IMPORTANT]
71
71
> The default SKU offers two 4-vCPU 16-GB server-side instances per account.
72
72
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.
- 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
+
73
89
## FAQs
74
90
75
91
### 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
92
108
93
109
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.
94
110
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.
100
111
101
112
## Supported regions
102
113
@@ -126,19 +137,10 @@ Currently, container copy is supported in the following regions:
126
137
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)
127
138
128
139
```output
129
-
"code": "500",
140
+
"code": "404",
130
141
"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\"]
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
-
142
144
* Error - (Request) is blocked by your Cosmos DB account firewall settings.
143
145
144
146
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:
147
149
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
148
150
ActivityId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
149
151
```
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
0 commit comments