Jump to Content
Databases

Firestore adds point-in-time recovery and scheduled backups

September 8, 2023
Malike Stewart

Product Manager, Firestore

Yixiao Shen

Software Engineer, Firestore

We are excited to announce the launch of two new disaster recovery features for Firestore: point-in-time recovery (PITR) and scheduled backups. These features will provide data protection against human errors and disasters. 

This is in addition to Firestore’s automatic and redundant data replication, which allows the service to guarantee up to 99.999% SLA availability with replica failovers demonstrating 0 RPO and 0 RTO.

Point-in-time recovery provides protection against accidental deletion or writes by giving you the ability to version control and query data from the past seven days, and surgically write the needed data back into your database.

Scheduled backups lets you backup your entire database on a chosen frequency of either daily and/or weekly onto cold storage. These backups can be used to restore to a new database in the same project. 

Point-in-time recovery example walkthrough

Let’s say you would like to enable point-in-time recovery. Below you will see how to enable this feature with the Google Cloud console: 

To enable point-in-time recovery, navigate to the “Disaster recovery” page and select the “EDIT” icon.

https://storage.googleapis.com/gweb-cloudblog-publish/images/Image_1.max-1600x1600.png

Select the checkbox for “Enable point-in-time recovery” and click “SAVE”.

https://storage.googleapis.com/gweb-cloudblog-publish/images/Image_2.max-1500x1500.png

The “Disaster recovery” page now includes “Earliest version time” and “Retention period”.

https://storage.googleapis.com/gweb-cloudblog-publish/images/Image_3.max-1600x1600.png

That's it! Point-in-time recovery is enabled and will begin storing data. Please refer to the documentation for more information. 

Scheduled backups example walkthrough

Now we will walk you through how to generate a backup schedule using gcloud commands for both daily and weekly, as well as how to validate that the backups were created. 

To prepare, you’ll want to:

  1. Upgrade gcloud to the newest version

  2. Run `gcloud config set project <project-id>` for the project in which you want to manage backups 

To create a daily backup schedule, use the “backups schedules create” command. Below is an example of daily backup schedule creation:

Loading...

To create a weekly backup schedule, use the “backups schedules create” command. Below is an example of weekly backup schedule creation:

Loading...

To validate the backup schedules have been created successfully, use the “backup schedules list” command:

Loading...

Next steps

For more information on how to set up and configure either of these features, simply check out our documentation for point-in-time recovery and scheduled backups for more information.


Thanks to Minh Nguyen, Senior Product Manager Lead for Firestore, for his contributions to this blog post.

Posted in