代码之家  ›  专栏  ›  技术社区  ›  kee

Google Cloud Firestore:如何将Firestore集合复制到云存储

  •  0
  • kee  · 技术社区  · 7 年前

    编写代码是将Firestore集合复制到云存储的唯一选项,还是有某种神奇的功能可以使用?

    我知道在下一次会议期间的Firestore talk中,这个新特性宣布要将Firestore集合导入BigQuery。云存储有类似的东西吗?

    2 回复  |  直到 7 年前
        1
  •  1
  •   kee    7 年前

    https://cloud.google.com/firestore/docs/manage-data/export-import . 不太确定这是否是一个新功能,但我要尝试一下。

        2
  •  1
  •   marson    7 年前

    是的,最后,Firebase启用了这个功能。

    1. Create Cloud Storage Bucket
    2. 如果尚未安装gcloud:在终端运行中 curl https://sdk.cloud.google.com | bash
      • 提示后 Modify profile to update your $PATH and enable bash completion? (Y/n) y +进入
    3. 下一步,跑 source .bash_profile
    4. 之后,运行: gcloud beta firestore export gs://[BUCKET-NAME] .

    1. gsutil cp -r gs://[BUCKET-NAME] /path/to/folder