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.

xeladu
Firebase Ninja

--

Made with Microsoft Designer

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:

  1. Install Google Cloud SDK.
    This also installs the Google Cloud CLI that we will use in the next steps.
  2. Log in with Google Cloud CLI.
    Execute…

--

--

xeladu
Firebase Ninja

Flutter and Firebase expert, blogger on QuickCoder.org, find my ebooks and freebies on shop.quickcoder.org, contact me on me.quickcoder.org!