使用 Stream Collections 到 BigQuery 扩展和 BigQuery 导出的 Firestore 备份,这是如何以及以什么格式完成的?

Firestore backup with Stream Collections to BigQuery-extension and BigQuery export, how and in what format is this done?

简而言之:使用 Stream Collections to BigQuery 扩展和 BigQuery 导出的 Firestore 备份,这是如何以及以什么格式完成的?

我有一个使用 Firestore 的项目,它实现了 Stream Collections to BigQuery-扩展以实现出色的数据分析可能性和 Data Studio。 如果发生数据丢失或某些灾难情况,问题将被转发给 BigQuery,因为相同的数据由于扩展而位于两个地方。但在 BigQuery 中,我可以使用 time travel 从过去 7 天的任何时间点获取数据。

现在阅读此 Whosebug 从 Firestore 到 GCS 的备份将开始花费很多。所以它似乎将数据流式传输到 BigQuery 并使用时间旅行功能将其作为备份或自动备份到 gcs。

我应该用什么方式导出 BigQuery 数据并将其导入 Firestore,是否可以导出为“.overall_export_metadata”格式,以便在需要时直接将其导入 Firestore。在问题的评论中说:

After your data is available in bigquery and you want to import it into firestore in a catastrophe situation, you can export it from bigquery in .overall_export_metadata format (file extension). And you can import files of this type into firestore.

2 件事:

  • 如您所说,firestore 导出的成本很高:您阅读每个文档都会花费成本。目前没有办法轻松备份。

如果您仍想放置自动备份,可以在此处查看:https://fireship.io/snippets/firestore-automated-backups/#:~:text=As%20of%20today%2C%20Firestore%20does,imported%20to%20replace%20lost%20data。 (据我所知,对于 firestore 数据库,没有“OOTB”方式来为 firestore DB 进行备份)