Stay organized with collectionsSave and categorize content based on your preferences.
This document provides information about disaster recovery tools and
techniques that help you protect your data from loss and downtime.
Spanner disaster recovery features
Spanner is designed to be scalable and globally distributed.
Spanner offers the following features to help ensure high
data availability:
Multi-regional configurations: Spanner can maintain
replicas of your data in separate zones
within a single region or multiple regions to ensure data availability
even if a zone or region fails.
Database deletion protection: You can protect against the
accidental deletion of existing databases by users or
service accounts that have the necessary Identity and Access Management (IAM)
permissions to delete the database.
Database back up and restore:
You can create backups of
Spanner databases and restore them to help protect
against operator and application errors.
All backups are highly available, encrypted, and can
be retained for up to a year from the time they are created.
You can create full backups on demand or by using a backup schedule.
You can only create incremental backups by using a backup schedule.
Export and import: You can
export Spanner databases to
Cloud Storage in either CSV or Avro format.
Point-in-time recovery (PITR):
Spanner point-in-time
recovery (PITR) provides protection against
logical data corruption, and accidental database deletion or writes. For example,
if an operator inadvertently writes data or an application launch corrupts the
database, you can recover the data from a point in time in the
past (up to 7 days).
Cross-region copy:
You can copy backups to different geographic
regions to protect your data against regional failures or to meet your
organization's compliance requirements.
Choose between backing up or exporting your database
Compare backing up your databases to exporting your databases
before deciding which one to use. For example, backups can have a maximum
retention period of one year. You can consider exporting your database
if you want a longer retention period than
one year. The following table describes similarities and differences between
using back up and restore versus using import and export:
Back up and restore
Import and export
Data consistency
Both backups and exported databases are transactionally and externally consistent.
Performance impact
Backups have no impact on an instance's performance. Spanner performs backups using dedicated jobs that don't draw upon an instance's server resources.
Export runs as a medium-priority task to minimize impact on database performance. For more information, seetask priority.
Storage format
Uses a proprietary, encrypted format designed for fast restore.
Youcreatebackups in the same instance as their source database.
After a backup is created, you cancopythe backup to an instance in a different region or project if you need a cross-region or cross-project backup. You can thenrestorefrom a backup as a new database to any instance in the same project. The instance that you are restoring to should have the same instance configuration as the instance where the backup is stored.
Exported databases reside inCloud Storageand the data can be migrated to any system that supports CSV or Avro.
Retention
Backups can be retained for up to one year.
Exported databases are stored in Cloud Storage where, by default, they are retained until they are deleted. You can customizelifecycleandretentionpolicies.
Pricing
Backups are billed to your Spanner project based on the storage used per unit time. For more details, see thePricingsection.
Restore happens in two operations: restore and optimize. The restore operation offers fast time-to-first-byte because the database directly mounts the backup without copying the data. After the restore operation completes, the database is ready for use, though read latency might be slightly higher while it is optimizing. For more information, seeHow restore works.
Import is slower. You need to wait for all the data to be written into the database.
Disaster recovery techniques
Spanner offers disaster recovery techniques to protect
your data against the following disasters:
Zonal failure: Spanner regional configuration
provides automatic protection against zonal failures, ensuring that if one
zone within a region fails, your application remains operational.
Regional failure: If your application requires even higher data
availability and protection against regional failures, usemulti-region configurationsthat offer 99.999% availability.
Major geographical disasters: Use Spannercross-region backup copyto make backups available in different regions.
Logical corruption: Use the following disaster recovery
techniques for different retention periods:
Set up abackup schedulethat creates full backups or incremental backups at a frequency that
meets your requirements. All backups can be retained for up to one year.
Export your databaseto
Cloud Storage where you can retain the data
for compliance, analytics, or reporting.
Accidental database deletion: Usedatabase deletion protectionto
prevent the accidental deletion of existing databases by users or service
accounts that have the necessary IAM permissions.
Optimize costs for your disaster recovery strategy
You can optimize Spanner disaster recovery
costs in the following ways:
Multi-region configurations: Use multi-region configurations only for
applications that require 99.999% availability. For applications that
require read-only latencies, consider read replicas in other regions.
Backup frequency: Schedule backups only as frequently as needed to
meet your requirements.
Backup type: Use incremental backup schedules to save storage costs.
Backup retention: Determine and set the backup retention period
for the shortest time required to meet your recovery and compliance needs.
Large data exports: Consider using SpannerData Boostfor large data
exports to offload compute resources from your instance and avoid negative
impact on your transaction performance.
Test your disaster recovery strategy
Consider testing and validating the following components of your disaster
recovery plan:
Simulate the most likely events that can cause data loss for
your organization.
Practice restoring your
databases from a created backup. For more information on restoring your
database, seeRestore overview.
Assess the impact of your disaster recovery plan on storage utilization.
Assess the impact of backup processes on your application performance.
Simulate a zonal or regional failure to test your failover and
recovery procedure.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Disaster recovery overview\n\nThis document provides information about disaster recovery tools and\ntechniques that help you protect your data from loss and downtime.\n\nSpanner disaster recovery features\n----------------------------------\n\nSpanner is designed to be scalable and globally distributed.\nSpanner offers the following features to help ensure high\ndata availability:\n\n- **Multi-regional configurations**: Spanner can maintain\n replicas of your data in separate zones\n within a single region or multiple regions to ensure data availability\n even if a zone or region fails.\n\n- **Database deletion protection**: You can protect against the\n accidental deletion of existing databases by users or\n service accounts that have the necessary Identity and Access Management (IAM)\n permissions to delete the database.\n\n- **Database back up and restore**:\n You can create backups of\n Spanner databases and restore them to help protect\n against operator and application errors.\n All backups are highly available, encrypted, and can\n be retained for up to a year from the time they are created.\n You can create full backups on demand or by using a backup schedule.\n You can only create incremental backups by using a backup schedule.\n\n- **Export and import**: You can\n export Spanner databases to\n Cloud Storage in either CSV or Avro format.\n\n- **Point-in-time recovery (PITR)**:\n Spanner point-in-time\n recovery (PITR) provides protection against\n logical data corruption, and accidental database deletion or writes. For example,\n if an operator inadvertently writes data or an application launch corrupts the\n database, you can recover the data from a point in time in the\n past (up to 7 days).\n\n- **Cross-region copy**:\n You can copy backups to different geographic\n regions to protect your data against regional failures or to meet your\n organization's compliance requirements.\n\n### Choose between backing up or exporting your database\n\nCompare backing up your databases to exporting your databases\nbefore deciding which one to use. For example, backups can have a maximum\nretention period of one year. You can consider exporting your database\nif you want a longer retention period than\none year. The following table describes similarities and differences between\nusing back up and restore versus using import and export:\n\nDisaster recovery techniques\n----------------------------\n\nSpanner offers disaster recovery techniques to protect\nyour data against the following disasters:\n\n- **Zonal failure**: Spanner regional configuration provides automatic protection against zonal failures, ensuring that if one zone within a region fails, your application remains operational.\n- **Regional failure** : If your application requires even higher data availability and protection against regional failures, use [multi-region configurations](/spanner/docs/instance-configurations) that offer 99.999% availability.\n- **Major geographical disasters** : Use Spanner [cross-region backup copy](/spanner/docs/backup#how-backup-copy-works) to make backups available in different regions.\n- **Logical corruption** : Use the following disaster recovery techniques for different retention periods:\n - Set up [point-in-time recovery (PITR)](/spanner/docs/pitr) to restore your data at any point in time within the last 7 days.\n - Set up a [backup schedule](/spanner/docs/backup/create-manage-backup-schedules) that creates full backups or incremental backups at a frequency that meets your requirements. All backups can be retained for up to one year.\n - [Export your database](/spanner/docs/import-export-overview) to Cloud Storage where you can retain the data for compliance, analytics, or reporting.\n- **Accidental database deletion** : Use [database deletion protection](/spanner/docs/prevent-database-deletion) to prevent the accidental deletion of existing databases by users or service accounts that have the necessary IAM permissions.\n\nOptimize costs for your disaster recovery strategy\n--------------------------------------------------\n\nYou can optimize Spanner disaster recovery\ncosts in the following ways:\n\n- **Multi-region configurations**: Use multi-region configurations only for applications that require 99.999% availability. For applications that require read-only latencies, consider read replicas in other regions.\n- **Backup frequency**: Schedule backups only as frequently as needed to meet your requirements.\n- **Backup type**: Use incremental backup schedules to save storage costs.\n- **Backup retention**: Determine and set the backup retention period for the shortest time required to meet your recovery and compliance needs.\n- **Large data exports** : Consider using Spanner [Data Boost](/spanner/docs/databoost/databoost-overview) for large data exports to offload compute resources from your instance and avoid negative impact on your transaction performance.\n\nTest your disaster recovery strategy\n------------------------------------\n\nConsider testing and validating the following components of your disaster\nrecovery plan:\n\n- Simulate the most likely events that can cause data loss for your organization.\n- Practice restoring your databases from a created backup. For more information on restoring your database, see [Restore overview](/spanner/docs/backup/restore-backup-overview).\n- Assess the impact of your disaster recovery plan on storage utilization.\n- Assess the impact of backup processes on your application performance.\n- Simulate a zonal or regional failure to test your failover and recovery procedure.\n\nWhat's next\n-----------\n\n- [Backups overview](/spanner/docs/backup)\n- [Create backups](/spanner/docs/backup/create-backups)\n- [Create and manage backup schedules](/spanner/docs/backup/create-manage-backup-schedules)\n- [PITR overview](/spanner/docs/pitr)"]]