16

I have noticed a new Datastore feature in Beta, Exporting and Importing service.

As far as I understand, Firestore runs on Datastore under the hood. Will it be possible to use this new Exporting and Importing feature for Firestore, too?

If not, is there a feature planned to create custom backups and restore them into a (different) project?

Ani
  • 1,377
  • 1
  • 18
  • 29
  • Just browsing the questions and I have found this! Hey is Firestore the replacement of datastore? App Engine? – Xenolion Oct 05 '17 at 15:42
  • @Xenolion No, it is not a replacement per se, but you could use it as an alternative storage service (like Cloud SQL etc.). It has similarities to Datastore, but has also some of the awesome mobile & sync features of Firebase Realtime Database. However, if your GAE app uses NDB lib for Datastore with tasklets, memcache and so on, could be difficult to replicate the good integration with the gcloud Python lib and Firestore. But I will look into it. – Ani Oct 05 '17 at 16:01
  • 1
    I have got you! I almost forgot about memcache! Check the comments from this guy who works for google https://stackoverflow.com/questions/46552124/beta-firebase-firestore-wont-work-with-projects-using-app-engine/46552830?noredirect=1#comment80133015_46552830 – Xenolion Oct 05 '17 at 16:18

1 Answers1

20

Update: Managed Export and Import is available.

Right now there is no import/export service for Cloud Firestore. We are working on this, it's at the top of the list of things we need to do before we can drop the "Beta" label.

You're right that Firestore is powered by the same technology as Datastore, but the two database are not exactly the same which is why you can't use plain-old Datastore export.

For now the best thing to do is to write your own import/export scripts using either the Java, Go, Node.js, or Python SDKs.

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
Sam Stern
  • 24,624
  • 13
  • 93
  • 124
  • 1
    Do you have any example node.js scripts for backups? Everyone just says to write your own but I haven't seen one yet. – Morgan O'Neal Oct 24 '17 at 16:13
  • please fix spinner in rules tab in cloud firestore, it is dancing :) – Shahzain ali Jan 16 '18 at 07:15
  • 2
    @MorganO'Neal I published a node package to run imports and exports from the command line. Feel free to try it out and give me some feedback: https://www.npmjs.com/package/node-firestore-import-export – jloosli Mar 09 '18 at 21:02
  • @jloosli The library doesn't work – Amine Harbaoui Jun 07 '18 at 15:52
  • Here is link for copy and export file : https://blog.cloudboost.io/copy-export-a-cloud-firestore-database-388cde99259b – Mayuri R Talaviya Jun 08 '18 at 09:29
  • Good news. import and export your Cloud Firestore data. Checkout the [blog](https://firebase.googleblog.com/2018/08/more-cloud-firestore-improvements.html) and [doc](https://firebase.google.com/docs/firestore/manage-data/export-import) for more info – Sivaraj S Aug 10 '18 at 01:26
  • 1
    @SivarajS You need to be in the blaze (paid) plan though, just FYI – Hilikus Aug 11 '18 at 20:44