如何将数据从 Firebase Firestore 模拟器导出到实际的 Firebase Firestore 数据库
方案:
我正在本地在POC上使用Firestore作为数据库。因为这是我的本地设置,所以我正在使用Firestore仿真器。现在,我的POC成功了,我想将本地数据库从模拟器移动到实际的Firestore。
查询:
有可能实现我要做的事情吗?
到目前为止,我无法在Internet上找到任何相关内容。我确实找到了几个示例,其中展示了从Firestore和将数据导出到本地模拟器的导出数据,但我找不到反之亦然的选项!
Scenario:
I am working on a POC locally where I am using Firestore as my database. As it is my local setup I am using Firestore Emulator. Now my POC is successful and I want to move local database from emulator to actual Firestore.
Query:
Is it possible to achieve what I am trying to do?
So far I am not able to find any relevant content on internet around this. I did find couple of examples where there is demonstration of exporting data from Firestore and importing to local emulator but I was not able to find the vice-versa option!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Firebase不提供任何类型的工具或服务来执行此操作。您最简单的替代方法是编写一个程序来查询模拟器中的数据并将其写入云托管实例中。您可能会发现Firebase Admin SDK有助于在本地运行的程序中写入云。
Firebase does not provide any sort of tool or service to do this. Your easiest alternative will be to write a program to query the data out of the emulator and write it into your cloud hosted instance. You might find the Firebase Admin SDK helpful for writing to the cloud in a program that you run locally.