相关疑难解决方法(0)

61
推荐指数
2
解决办法
4万
查看次数

如何每天自动备份Firestore数据库

我想每天备份一个Firestore数据库。

我的数据结构是这样的:

usersCollection
  uid
     defaultCurrency: 'USD'
     name: 'something'
     dreamsCollection
                     name
                     image
Run Code Online (Sandbox Code Playgroud)

我已经研究过firestore-export-importnode-firestore-backup进行备份并将数据导出到JSON文件。

我的问题是:

  1. 如果创建云功能,我如何每天运行云功能?
  2. 备份的最佳方法是什么?
    • 我应该将数据存储在Firebase存储中吗?
    • 我应该将JSON保存到单独的服务等吗?

任何帮助,无论多么小,我们将不胜感激。

谢谢

firebase google-cloud-functions google-cloud-firestore

8
推荐指数
4
解决办法
2662
查看次数

ImportError:无法为Python导入Cloud Firestore库

尝试在python服务器上集成Google Firestore API

...
  File "/home/daffolap-355/repos/subscriptions/appvendor/firebase_admin/firestore.py", line 28, in <module>
    raise ImportError('Failed to import the Cloud Firestore library for Python. Make sure '
ImportError: Failed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.
Run Code Online (Sandbox Code Playgroud)

我在这里收到此错误:

from firebase_admin import credentials, auth, firestore

我安装了firebase-admin模块:

pip install --upgrade -t libs firebase-admin

并运行应用

dev_appserver app.yaml

python google-app-engine firebase firebase-admin google-cloud-firestore

7
推荐指数
2
解决办法
3287
查看次数