Backup Firestore data to storage bucket on a schedule in GCP

How to backup your Firestore data to cloud storage bucket using Cloud Function and Cloud Scheduler on Google Cloud Platform

Chris Kitson
The Startup

--

In this article we are going to use four features of Google Cloud Platform (in four simple steps) to backup our Firestore database to a storage bucket.

The four steps are as follows:

  1. Create a storage bucket to hold your data using Cloud Storage
  2. Create a method to backup the data using Cloud Functions
  3. Create schedule to run backup using Cloud Scheduler
  4. Enable appropriate permissions in IAM

So, let’s begin…

Create a storage bucket to hold your data

First off, let’s log into GCP web console and browse to Storage, then Browser. Then click on Create Bucket button and use the below values.

  • Name — an unique name of your choice
  • Where to store — select Multi-regional
  • Storage class — select Nearline

Leave the remaining defaults then click Create.

Create a method to backup the data

--

--