Functions-samples: Firestore Backup examples

Created on 12 Nov 2018  路  3Comments  路  Source: firebase/functions-samples

It would be great to have an example of how to automate backups of Firestore using Cloud Functions.

I am currently in the position where I am trying to figure out how this would work with the Firestore REST API and came across lots of trouble so I think it would be great for anyone to get backups up and running as easy as possible.

In my opinion, in the sample should be easily configurable to change the storage bucket, the collections which should be included in the export and a custom naming for the bucket.
Also what would be great how to authenticate the request using (if possible the Admin SDK) or how to get a service account which does all the important stuff.

Also, a counterpart for importing a backup could be useful.

feature request

Most helpful comment

@JerryBels we agree and adding a point-in-time consistent, automated backup and restore solution to Cloud Firestore is on our roadmap. I can't share more than that though. We do appreciate the feedback!

I am going to close this issue as the solutions documentation is the best choice right now.

All 3 comments

This example here uses Node.js on AppEngine:
https://firebase.google.com/docs/firestore/solutions/schedule-export

It should be pretty easy to adapt that to Cloud Functions!

IMHO, being able to backup your DB and restore it whenever needed is a core functionality of any system. It should be possible from the FB Dashboard, TBH - a button to backup, a list to choose a backup to restore, a way to schedule it at fixed intervals. It seems really basic, and if I did it in a few hours using a NodeJS script, that I have to manage by myself, it seems strange that the team couldn't easily add this.

@JerryBels we agree and adding a point-in-time consistent, automated backup and restore solution to Cloud Firestore is on our roadmap. I can't share more than that though. We do appreciate the feedback!

I am going to close this issue as the solutions documentation is the best choice right now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsaarikivi picture tsaarikivi  路  4Comments

nhathiwala picture nhathiwala  路  4Comments

inglesuniversal picture inglesuniversal  路  5Comments

Rovel picture Rovel  路  5Comments

Qzingo picture Qzingo  路  3Comments