Member-only story
How To Backup Your Cloud Firestore Database
Backups are underrated … until you really need them. So here is how to backup your Cloud Firestore database.
I store quite a lot of stuff in Firestore. It’s mostly for personal use but my GDash — Advanced Gumroad Dashboard also caches a lot of Gumroad data with it. In the last months, I often thought about backups. But I have to admit … I am lazy when it comes to boring stuff. However, some of the data is really valuable and will be lost in case of a disaster. So I finally stopped doing cooler things and investigate backup solutions. Here is my approach on how to backup your Cloud Firestore database.
💡 This feature is still in a preview state but I haven’t encountered
any issues yet!
Using the Google Cloud tools
While I could write a manual exporter/importer and run it as a scheduled Cloud Function, I prefer existing official solutions because I might miss things that Google hopefully doesn’t.
So I went with the official Firestore backup guide. Here is a summary of what you need to do:
- Install Google Cloud SDK.
This also installs the Google Cloud CLI that we will use in the next steps. - Log in with Google Cloud CLI.
Execute…