Skip to content

Commit fb16adb

Browse files
authored
Merge pull request #269817 from kanshiG/patch-151
Update restore-account-continuous-backup.md
2 parents fe27e85 + a32045d commit fb16adb

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

articles/cosmos-db/restore-account-continuous-backup.md

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to identify the restore time and restore a live or delete
44
author: kanshiG
55
ms.service: cosmos-db
66
ms.topic: how-to
7-
ms.date: 03/31/2023
7+
ms.date: 03/21/2024
88
ms.author: govindk
99
ms.reviewer: mjbrown
1010
ms.custom: devx-track-azurepowershell, devx-track-azurecli, devx-track-arm-template
@@ -122,7 +122,7 @@ Before restoring the account, install the [latest version of Azure PowerShell](/
122122

123123
### <a id="trigger-restore-ps"></a>Trigger a restore operation for API for NoSQL account
124124

125-
The following cmdlet is an example to trigger a restore operation with the restore command by using the target account, source account, location, resource group, PublicNetworkAccess and timestamp:
125+
The following cmdlet is an example to trigger a restore operation with the restore command by using the target account, source account, location, resource group, PublicNetworkAccess, DisableTtl, and timestamp:
126126

127127

128128

@@ -134,7 +134,8 @@ Restore-AzCosmosDBAccount `
134134
-SourceDatabaseAccountName "SourceDatabaseAccountName" `
135135
-RestoreTimestampInUtc "UTCTime" `
136136
-Location "AzureRegionName" `
137-
-PublicNetworkAccess Disabled
137+
-PublicNetworkAccess Disabled `
138+
-DisableTtl $true
138139
139140
```
140141

@@ -149,9 +150,11 @@ Restore-AzCosmosDBAccount `
149150
-RestoreTimestampInUtc "2021-01-05T22:06:00" `
150151
-Location "West US" `
151152
-PublicNetworkAccess Disabled
153+
-DisableTtl $false
154+
152155
153156
```
154-
If `PublicNetworkAccess` is not set, restored account is accessible from public network, please ensure to pass `Disabled` to the `PublicNetworkAccess` option to disable public network access for restored account.
157+
If `PublicNetworkAccess` is not set, restored account is accessible from public network, please ensure to pass `Disabled` to the `PublicNetworkAccess` option to disable public network access for restored account. Setting DisableTtl to $true ensures TTL is disabled on restored account, not providing parameter restores the account with TTL enabled if it was set earlier.
155158

156159
> [!NOTE]
157160
> For restoring with public network access disabled, the minimum stable version of Az.CosmosDB required is 1.12.0.
@@ -422,11 +425,12 @@ az cosmosdb restore \
422425
--restore-timestamp 2020-07-13T16:03:41+0000 \
423426
--resource-group <MyResourceGroup> \
424427
--location "West US" \
425-
--public-network-access Disabled
428+
--public-network-access Disabled \
429+
--disable-ttl True
426430
427431
```
428432

429-
If `--public-network-access` is not set, restored account is accessible from public network. Please ensure to pass `Disabled` to the `--public-network-access` option to prevent public network access for restored account.
433+
If `--public-network-access` is not set, restored account is accessible from public network. Please ensure to pass `Disabled` to the `--public-network-access` option to prevent public network access for restored account. Setting disable-ttl to to $true ensures TTL is disabled on restored account, and not providing this parameter restores the account with TTL enabled if it was set earlier.
430434

431435
> [!NOTE]
432436
> For restoring with public network access disabled, the minimum stable version of azure-cli is 2.52.0.
@@ -537,8 +541,7 @@ This command output now shows when a database was created and deleted.
537541
[
538542
{
539543
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/abcd1234-d1c0-4645-a699-abcd1234/restorableSqlDatabases/40e93dbd-2abe-4356-a31a-35567b777220",
540-
..
541-
"name": "40e93dbd-2abe-4356-a31a-35567b777220",
544+
"name": "40e93dbd-2abe-4356-a31a-35567b777220",
542545
"resource": {
543546
"database": {
544547
"id": "db1"
@@ -548,11 +551,10 @@ This command output now shows when a database was created and deleted.
548551
"ownerId": "db1",
549552
"ownerResourceId": "YuZAAA=="
550553
},
551-
..
554+
552555
},
553556
{
554557
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/abcd1234-d1c0-4645-a699-abcd1234/restorableSqlDatabases/243c38cb-5c41-4931-8cfb-5948881a40ea",
555-
..
556558
"name": "243c38cb-5c41-4931-8cfb-5948881a40ea",
557559
"resource": {
558560
"database": {
@@ -563,7 +565,7 @@ This command output now shows when a database was created and deleted.
563565
"ownerId": "spdb1",
564566
"ownerResourceId": "OIQ1AA=="
565567
},
566-
..
568+
567569
}
568570
]
569571
```
@@ -584,16 +586,12 @@ This command output shows includes list of operations performed on all the conta
584586
```json
585587
[
586588
{
587-
...
588-
589589
"eventTimestamp": "2021-01-08T23:25:29Z",
590590
"operationType": "Replace",
591591
"ownerId": "procol3",
592592
"ownerResourceId": "OIQ1APZ7U18="
593-
...
594593
},
595594
{
596-
...
597595
"eventTimestamp": "2021-01-08T23:25:26Z",
598596
"operationType": "Create",
599597
"ownerId": "procol3",
@@ -730,16 +728,13 @@ az cosmosdb gremlin restorable-resource list \
730728
--restore-location "West US" \
731729
--restore-timestamp "2021-01-10T01:00:00+0000"
732730
```
731+
This command output shows the graphs which are restorable:
732+
733733
```
734-
[ {
735-
```
734+
[
735+
{
736736
"databaseName": "db1",
737-
"graphNames": [
738-
"graph1",
739-
"graph3",
740-
"graph2"
741-
]
742-
```
737+
"graphNames": [ "graph1", "graph3", "graph2" ]
743738
}
744739
]
745740
```
@@ -755,9 +750,10 @@ az cosmosdb table restorable-table list \
755750
--instance-id "abcd1234-d1c0-4645-a699-abcd1234"
756751
--location "West US"
757752
```
753+
758754
```
759755
[ {
760-
```
756+
761757
"id": "/subscriptions/23587e98-b6ac-4328-a753-03bcd3c8e744/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/7e4d666a-c6ba-4e1f-a4b9-e92017c5e8df/restorableTables/59781d91-682b-4cc2-93a3-c25d03fab159",
762758
"name": "59781d91-682b-4cc2-93a3-c25d03fab159",
763759
"resource": {
@@ -766,11 +762,10 @@ az cosmosdb table restorable-table list \
766762
"ownerId": "table1",
767763
"ownerResourceId": "tOdDAKYiBhQ=",
768764
"rid": "9pvDGwAAAA=="
769-
},
770-
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables"
771-
```
772765
},
773-
```
766+
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables"
767+
},
768+
774769
{"id": "/subscriptions/23587e98-b6ac-4328-a753-03bcd3c8e744/providers/Microsoft.DocumentDB/locations/eastus2euap/restorableDatabaseAccounts/7e4d666a-c6ba-4e1f-a4b9-e92017c5e8df/restorableTables/2c9f35eb-a14c-4ab5-a7e0-6326c4f6b785",
775770
"name": "2c9f35eb-a14c-4ab5-a7e0-6326c4f6b785",
776771
"resource": {
@@ -781,7 +776,7 @@ az cosmosdb table restorable-table list \
781776
"rid": "01DtkgAAAA=="
782777
},
783778
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables"
784-
```
779+
785780
},
786781
]
787782
```
@@ -795,14 +790,16 @@ az cosmosdb table restorable-resource list \
795790
--restore-location "West US" \
796791
--restore-timestamp "2020-07-20T16:09:53+0000"
797792
```
793+
794+
Following is the result of the command.
795+
798796
```
799797
{
800798
"tableNames": [
801-
```
802799
"table1",
803800
"table3",
804801
"table2"
805-
```
802+
806803
]
807804
}
808805
```
@@ -840,7 +837,8 @@ Use the following ARM template to restore an account for the Azure Cosmos DB API
840837
"restoreParameters": {
841838
"restoreSource": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/6a18ecb8-88c2-4005-8dce-07b44b9741df",
842839
"restoreMode": "PointInTime",
843-
"restoreTimestampInUtc": "6/24/2020 4:01:48 AM"
840+
"restoreTimestampInUtc": "6/24/2020 4:01:48 AM",
841+
"restoreWithTtlDisabled": "true"
844842
}
845843
}
846844
}

0 commit comments

Comments
 (0)