सामग्री पर जाएँ
← Cosmos DB overview पर वापस
Killer #9

PITR Browser — Point-in-Time Restore

Cosmos में continuous backup (7d या 30d) है लेकिन restore केवल az-cli या portal के माध्यम से चलता है। Horizon की visual timeline, restore plan validator, सभी parameters के साथ `az cosmosdb restore` command generator + host shell के माध्यम से execute करने के विकल्प के साथ dedicated UI। DR drill के लिए, prod में bug recovery के लिए, WHAT-IF Lab sandbox बनाने के लिए।

ऐप में यह कहाँ रहता है: Tools → Cosmos DB → PITR — Point-in-Time Restore

यह क्या करता है

  • Continuous-backup window की visual timeline (7d default या 30d)।
  • Plan validator: timestamp horizon के अंदर, unique target account name, valid region।
  • Source/target/restorePoint/region के साथ `az cosmosdb restore` command का generator।
  • IPC के माध्यम से execute करने के लिए "Run via host shell" बटन (logged-in az-cli की आवश्यकता है)।
  • Audit trail (v2 ऐप द्वारा triggered restores की सूची surface करता है)।

चरण-दर-चरण

  1. 1

    PITR Browser खोलें

    Tools → Cosmos DB → PITR — Point-in-Time Restore। Submenu के माध्यम से shortcut।

  2. 2

    Source account + backup type चुनें

    Source Cosmos account का नाम + type (continuous-7d / continuous-30d / periodic) डालें।

  3. 3

    Restore timestamp चुनें

    ISO-8601 format (जैसे 2026-05-24T12:34:56Z)। Timeline में दिखाए गए horizon के अंदर होना चाहिए।

  4. 4

    Target account name परिभाषित करें

    नए Cosmos account का नाम जहाँ snapshot live account बनेगा। Auto-suggest "<source>-restored-<timestamp>"।

  5. 5

    Plan Validate करें

    "Validate plan" बटन — चेक करता है: timestamp horizon के अंदर, future में नहीं, unique account name। Banner success/error।

  6. 6

    Execute करें (CLI या shell)

    अनुशंसित मोड: external privileged shell में execute करने के लिए "Copy CLI"। सुविधाजनक मोड: "Run via host shell" Electron IPC का उपयोग करता है यदि az-cli session सक्रिय है।

    az cosmosdb restore \
      --target-database-account-name my-cosmos-restored-1234567 \
      --account-name my-cosmos-account \
      --resource-group my-rg \
      --restore-timestamp 2026-05-24T12:34:56Z \
      --location eastus
  7. 7

    Portal में अनुसरण करें

    Restore dataset पर निर्भर करता है 30 मिनट से 24h लगता है। Portal resource group में progress दिखाता है।

वास्तविक use cases

Prod में bad migration

Team ने ग़लत `dropIndex` migration किया जिसने critical index हटा दिया। 2h पहले PITR के माध्यम से rollback — कोई post-recovery data loss नहीं (Change Feed के माध्यम से merged)।

Compliance drill

SOC 2 audit PITR demo माँगता है। DBA UI के माध्यम से 30 मिनट में sandbox account के लिए restore चलाता है। Auditor संतुष्ट।

अपने Cosmos account पर इसे देखने के लिए तैयार?NoSqlStudio डाउनलोड करेंअगला → Migration Wizard