New to Firestore, really enjoy using it but the one issue I have is that I can't see an obvious way to backup the entire database for a given project, the idea being that if anything goes wrong I can overwrite the nodes with the backup.
Whats the preferred way to backup an entire firestore database automatically on a schedule that would allow for a manual restore
Asked Answered
In the Realtime Database, you can back up your data by simply exporting it from the Firebase Console. However, for Firestore, you have to use Google Cloud Console. Here are the docs:
If you need to schedule that operation, it's recommended to use Cloud Functions for Firebase as explained here:
Hey Jeff. Can I help you with other information? –
Seashore
The top link is no longer valid I think. –
Antoninaantonino
@ShaunRamsey I just checked and it is still valid. –
Seashore
So it seems it is! I tried to go to it 3 times and got "Service Unavailable." However, with a few refreshes and trying different browsers it comes right up. It makes me wonder how many times this has happened to me and I gave up on valid documentation because this has happened to me a lot in the firebase websites. Thanks for the confirmation! –
Antoninaantonino
There's a new way to automatically setup and schedule your Firestore backups using gcloud
.
I also published a blog post on how you can use the Python discovery client to achieve the same programatically.
This option is indeed great, but the document doesn't have specific section to select "collectionIDs" whereas scheduled data export allows us to do so. –
Chemesh
© 2022 - 2024 — McMap. All rights reserved.