[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[[["\u003cp\u003eFirestore in Datastore mode offers features for disaster recovery, including data replication across multiple zones in regional and multi-regional locations to protect against infrastructure outages.\u003c/p\u003e\n"],["\u003cp\u003eDatastore mode automatically manages data replication, with multi-region databases providing 99.999% availability and regional databases offering 99.99% availability, without requiring extra configuration.\u003c/p\u003e\n"],["\u003cp\u003eScheduled backups can be set up to protect against data disasters, with retention periods up to 14 weeks, allowing restoration to a new database.\u003c/p\u003e\n"],["\u003cp\u003ePoint-in-time recovery (PITR) allows reading data from up to seven days in the past, with a granularity of 1 minute, providing a recovery time objective of 0 and a recovery point objective of 1 minute.\u003c/p\u003e\n"],["\u003cp\u003eFor longer data retention needs beyond 14 weeks, PITR data exports can create full database exports to Cloud Storage, useful for archiving, though they are more expensive than backups for recovery.\u003c/p\u003e\n"]]],[],null,["# Plan disaster recovery\n\nThis page describes Firestore in Datastore mode features that can help you create and implement\ndisaster recovery plans.\n\nDisaster recovery planning for cloud infrastructure outages\n-----------------------------------------------------------\n\nTo protect against potential cloud infrastructure disruptions in Google Cloud\nsuch as a zone or region experiencing an outage, Datastore mode\nreplicates data across multiple replica databases.\n\nThe replication architecture depends on whether the database is in a regional\nlocation or a multi-region location. Regional databases synchronously\nreplicate data across at least three zones. Multi-region databases\nsynchronously replicate data across five zones in three regions with two serving\nregions and one witness region. Multi-region databases maximize the availability\nand durability of databases by providing 99.999% availability. Regional\ndatabases provide 99.99% availability.\n\nDatastore mode automatically handles replication for you and doesn't require\nadditional configuration or provisioning. For additional information, see the\nfollowing:\n\nFor more information on the replication architecture, see\n[Architecting disaster recovery for cloud infrastructure outages](https://cloud.google.com/architecture/disaster-recovery#firestore).\n\nDisaster recovery planning for data\n-----------------------------------\n\nTo protect against data disasters like accidental deletion or modification of\ndata, use scheduled backups and point-in-time recovery (PITR). Depending on your\ndisaster recovery requirements, you might use\nboth features together.\n\n### Scheduled backups\n\nBackups support a maximum retention period of 14 weeks. You can schedule daily\nor weekly backups. You can restore your database from a backup to a new\nDatastore mode database in the same project. For more details,\nsee [Back up and restore data](/datastore/docs/backups).\n\nBackups provide a higher retention period than PITR. Restoring a database from\na backup costs less than restoring a database from PITR data.\n\n### Point-in-time recovery (PITR)\n\nEnable PITR to read documents from a point in time up to seven days in the past.\nYou can read data at a granularity level of 1 minute and surgically write\nback into the your database with a\nrecovery time objective (maximum time for recovery) of 0. The\nrecovery point objective (maximum possible data loss) is 1\nminute. For more details, see [Point in time recovery](/datastore/docs/pitr).\n\nIf you don't need to restore an entire database, PITR can recover only the data\nrequired. PITR also provides a lower recovery time objective and\nlower recovery point objective than backups.\n\n#### Data exports\n\nFor data retention needs beyond 14 weeks,\nyou can use PITR to create an export of your entire database and\nsave this data in Cloud Storage indefinitely. A PITR data export captures\ndata from a timestamp up to seven days in the past.\n\nPITR data exports are useful for archiving data from your database.\nWhen compared to backups, recovering a database from a PITR export is\ngenerally more expensive than recovering the same data from a backup.\n\nTo start a PITR export operation, see\n[Export and import from PITR data](/datastore/docs/use-pitr#export-import).\n\nWhat's next\n-----------\n\n- [Learn about backups](/datastore/docs/backups)\n- [Learn about PITR exports](/datastore/docs/pitr)"]]