이 문서에서는 데이터를 손실과 다운타임으로부터 보호하는 데 도움이 되는 재해 복구 도구와 기법에 대한 정보를 제공합니다.
Spanner 재해 복구 기능
Spanner는 확장 가능하고 전역적으로 분산되도록 설계되었습니다.
Spanner는 높은 데이터 가용성을 보장하는 데 도움이 되는 다음 기능을 제공합니다.
멀티 리전 구성: Spanner는 단일 리전이나 여러 리전 내 별도 영역에 데이터 복제본을 유지하여 영역이나 리전이 실패하더라도 데이터 가용성을 보장할 수 있습니다.
데이터베이스 삭제 보호: 데이터베이스를 삭제하는 데 필요한 Identity and Access Management(IAM) 권한이 있는 사용자나 서비스 계정에서 기존 데이터베이스를 실수로 삭제하지 않도록 보호할 수 있습니다.
데이터베이스 백업 및 복원: Spanner 데이터베이스 백업을 만들고 이를 복원하여 운영자 및 애플리케이션 오류로부터 보호할 수 있습니다.
모든 백업은 가용성이 높고 암호화되며 생성된 시점으로부터 최대 1년까지 보관될 수 있습니다.
주문형으로 또는 백업 일정을 사용하여 전체 백업을 만들 수 있습니다.
증분 백업을 만들려면 백업 일정을 사용해야 합니다.
내보내기 및 가져오기: Spanner 데이터베이스를 CSV 또는 Avro 형식으로 Cloud Storage로 내보낼 수 있습니다.
PITR(point-in-time recovery): Spanner PITR(point-in-time recovery)은 논리 데이터 손상, 실수로 인한 데이터베이스 삭제 또는 쓰기로부터 보호합니다. 예를 들어 운영자가 실수로 데이터를 쓰거나 애플리케이션 실행으로 인해 데이터베이스가 손상되는 경우 데이터를 이전 시점(최대 7일)으로 복구할 수 있습니다.
리전 간 복사: 백업을 여러 지리적 리전에 복사하여 데이터를 리전별 장애로부터 보호하거나 조직의 규정 준수 요구사항을 충족할 수 있습니다.
데이터베이스 백업 또는 내보내기 중에서 선택
데이터베이스 백업 또는 데이터베이스 내보내기를 사용하기 전에 이 둘을 비교합니다. 예를 들어 백업 최대 보관 기간은 1년입니다. 보관 기간을 1년 이상으로 설정하려면 데이터베이스를 내보내는 것이 좋습니다. 다음 표에서는 백업 및 복원 사용과 가져오기 및 내보내기 사용 간의 유사점과 차이점을 설명합니다.
백업 및 복원
가져오기 및 내보내기
데이터 일관성
백업 및 내보낸 데이터베이스 모두 transactional consistency 및 external consistency를 갖습니다.
성능 영향
백업은 인스턴스 성능에 영향을 미치지 않습니다. Spanner는 인스턴스의 서버 리소스를 사용하지 않는 전용 작업을 사용하여 백업을 수행합니다.
내보내기는 데이터베이스 성능에 미치는 영향을 최소화하기 위해 중간 우선순위 태스크로 실행됩니다. 자세한 내용은 태스크 우선순위를 참조하세요.
백업이 생성된 후 리전 간 또는 프로젝트 간 백업이 필요한 경우 다른 리전 또는 프로젝트의 인스턴스에 백업을 복사할 수 있습니다. 그런 다음 새 데이터베이스의 백업에서 동일한 프로젝트의 모든 인스턴스로 복원할 수 있습니다. 복원하려는 인스턴스는 백업이 저장된 인스턴스와 동일한 인스턴스 구성을 가져야 합니다.
내보낸 데이터베이스는 Cloud Storage에 저장되고 데이터는 CSV 또는 Avro를 지원하는 시스템으로 마이그레이션될 수 있습니다.
보관
백업을 최대 1년까지 보관할 수 있습니다.
내보낸 데이터베이스는 Cloud Storage에 저장되며, 기본적으로 삭제되기 전까지 계속 보관됩니다. 수명 주기 및 보관 정책을 맞춤설정할 수 있습니다.
가격 책정
백업은 단위 시간별로 사용된 스토리지를 기준으로 Spanner 프로젝트에 청구됩니다. 자세한 내용은 가격 책정 섹션을 참조하세요.
복원은 복원 및 최적화의 두 작업으로 수행됩니다. 데이터 복사 없이 데이터베이스가 백업을 직접 마운트하기 때문에 복원 작업은 빠른 첫 바이트 소요 시간을 제공합니다. 최적화하는 동안 읽기 대기 시간이 약간 더 높을 수 있지만 복원 작업이 완료된 다음에는 데이터베이스를 사용할 준비가 됩니다. 자세한 내용은 복원 작동 방법을 참조하세요.
가져오기는 속도가 더 느립니다. 모든 데이터가 데이터베이스에 기록될 때까지 기다려야 합니다.
재해 복구 기법
Spanner는 다음과 같은 재해로부터 데이터를 보호하는 재해 복구 기법을 제공합니다.
영역 장애: Spanner 리전 구성은 영역 장애에 대한 자동 보호 기능을 제공하므로 리전 내 한 영역에서 장애가 발생하더라도 애플리케이션은 계속 작동합니다.
리전 장애: 애플리케이션에 더 높은 데이터 가용성과 리전 장애에 대한 보호가 필요한 경우에는 99.999% 가용성을 제공하는 멀티 리전 구성을 사용합니다.
주요 지리적 재해: 여러 리전에서 백업을 사용할 수 있도록 Spanner 리전 간 백업 사본을 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(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)"]]