[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Plan disaster recovery\n======================\n\nThis page describes Firestore with MongoDB compatibility 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, Firestore with MongoDB compatibility\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\nFirestore with MongoDB compatibility 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\nFirestore with MongoDB compatibility database in the same project. For more details,\nsee [Back up and restore data](/firestore/mongodb-compatibility/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](/firestore/mongodb-compatibility/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](/firestore/mongodb-compatibility/docs/use-pitr#export-import).\n\nWhat's next\n-----------\n\n- [Learn about backups](/firestore/mongodb-compatibility/docs/backups)\n- [Learn about PITR exports](/firestore/mongodb-compatibility/docs/pitr)"]]