최소 권한 원칙을 준수하면서 이러한 권한을 얻으려면 관리자에게 roles/alloydb.admin(AlloyDB 관리자 사전 정의된 IAM) 역할을 부여해 달라고 요청하세요.
최근 특정 시점에서 복원
AlloyDB를 사용하면 최근의 특정 범위 내에서 언제든지 활성 클러스터의 데이터를 완전히 복원할 수 있습니다.
사용 가능한 PITR 기간
다음 두 시점 중 더 최근 시점 이후의 시점에서 복원할 수 있습니다.
복구 기간의 한계로 표시되는 시점입니다. 예를 들어 복구 기간이 14일인 경우 이 시점은 14일 전입니다.
마지막으로 지속적 백업을 사용 설정한 이후에 실행된 가장 오래된 백업의 생성 시간입니다. 지속적 백업이 사용 설정된 상태로 클러스터를 생성했고 그 이후로 지속적 백업을 사용 중지하지 않은 경우 이 시점이 클러스터의 가장 오래된 백업 생성 시간이 됩니다.
지속적 백업을 사용 중지했다가 다시 사용 설정하면 사용자가 또는 AlloyDB가 클러스터의 첫 번째 새 백업을 만들 때까지 PITR(point-in-time recovery)을 수행할 수 없습니다. 주문형 백업이거나 지속적 백업을 사용 설정한 후 AlloyDB에서 실행하는 일일 백업 중 첫 번째 백업일 수 있습니다. 백업 유형에 대한 자세한 내용은 데이터 백업 및 복구 개요를 참고하세요.
특정 시점으로 복원 수행
Google Cloud 콘솔 또는 Google Cloud CLI를 사용하여 복원을 실행합니다.
네트워크 필드에서 새 클러스터가 사용할 가상 프라이빗 클라우드(VPC) 네트워크를 선택합니다.
기본 Google 관리 암호화 대신 고객 관리 암호화 키(CMEK)를 사용하여 이 클러스터의 연속 백업 및 데이터 변경 로그를 암호화하려면 다음 단계를 따르세요.
고급 암호화 옵션을 클릭합니다.
고객 관리 암호화 키 (CMEK) 라디오 버튼을 클릭합니다.
고객 관리 키 선택 목록을 클릭하고 키를 선택합니다.
복원을 클릭합니다.
gcloud
클러스터와 타임스탬프를 지정하여 gcloud alloydb clusters
restore 명령어를 사용합니다. 백업에서 복원과 달리 point-in-time recovery를 사용하려면 원래 클러스터가 계속 존재해야 합니다. 삭제된 클러스터에서는 이러한 종류의 복원을 실행할 수 없습니다.
SOURCE_CLUSTER: 데이터를 복구할 클러스터의 ID입니다.
다른 프로젝트의 클러스터에서 복원하려면 다음 형식으로 전체 클러스터 경로로 바꿉니다. projects/SOURCE_PROJECT/locations/SOURCE_REGION/clusters/SOURCE_CLUSTER
TIMESTAMP: 데이터를 복구할 시점의 설명입니다. RFC 3339 형식으로 표현됩니다(예: 2012-11-15T16:19:00.094Z). 마이크로초만큼 작은 소수점 이하 초를 지정할 수 있습니다.
이 타임스탬프는 클러스터를 만들 때 지정한 보관 기간 내에 있어야 합니다.
REGION: 소스 클러스터가 포함되어 있고 AlloyDB가 새 클러스터를 만드는 리전입니다.
예를 들면 us-central1입니다.
PROJECT_ID: 새 클러스터가 있는 프로젝트의 ID입니다.
Google 관리 암호화 대신 고객 관리 암호화 키(CMEK)로 새 클러스터의 데이터를 암호화하려면 다음 추가 인수를 제공해야 합니다.
[[["이해하기 쉬움","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-04(UTC)"],[[["\u003cp\u003eThis guide outlines the process of restoring an AlloyDB for PostgreSQL cluster to a specific point in time for rapid data recovery.\u003c/p\u003e\n"],["\u003cp\u003ePoint-in-time recovery (PITR) allows restoring data from any moment within a defined recovery window, determined by the recovery window's limit or the creation time of the oldest backup.\u003c/p\u003e\n"],["\u003cp\u003eRestoring from a point in time requires the original cluster to be active and is accessible through the Google Cloud console or the \u003ccode\u003egcloud\u003c/code\u003e CLI.\u003c/p\u003e\n"],["\u003cp\u003eWhen performing a point-in-time restore, users must specify a target timestamp within the retention period and configure settings for the new cluster, such as network and encryption options.\u003c/p\u003e\n"],["\u003cp\u003eAfter the restore, a new primary instance needs to be created to access the restored data, and optionally, read-pool instances can be added.\u003c/p\u003e\n"]]],[],null,["# Use point-in-time recovery (PITR)\n\nThis page describes how to restore a cluster to a recent\npast state. Restoring data to a point in time into\nan AlloyDB for PostgreSQL cluster is recommended for rapid recovery\nfrom large-scale data loss.\n\n\nBefore you begin\n----------------\n\n- The Google Cloud project you are using must have been [enabled to access AlloyDB](/alloydb/docs/project-enable-access).\n- You must have one of these IAM roles in the Google Cloud project you are using:\n - `roles/alloydb.admin` (the AlloyDB Admin predefined IAM role)\n - `roles/owner` (the Owner basic IAM role)\n - `roles/editor` (the Editor basic IAM role)\n\n If you don't have any of these roles, contact your Organization Administrator to request\n access.\n\n- You must have all of these IAM roles in the Google Cloud project you are using:\n - `compute.networks.list`\n - `compute.addresses.create`\n - `compute.addresses.list`\n - `compute.globalAddresses.create`\n - `compute.globalAddresses.list`\n - `servicenetworking.services.addPeering`\n\n \u003cbr /\u003e\n\n To gain these permissions while following the principle of least privilege, ask\n your administrator to grant you the `roles/alloydb.admin` (\n AlloyDB Admin predefined IAM) role.\n\n\u003cbr /\u003e\n\nRestore from a recent point in time\n-----------------------------------\n\nAlloyDB lets you fully restore an active cluster's data from any\npoint in time within a specific, recent range.\n\n### Available PITR windows\n\nYou can restore from any point in time after the more recent of the following\ntwo moments:\n\n- **The moment represented by the limit of your recovery window.** For\n example, if you have a 14-day recovery window, then this moment is 14 days\n in the past.\n\n- **The creation time of the oldest backup taken since you last enabled\n continuous backup.** If you created the cluster with continuous backup\n enabled, and you have not disabled continuous backup since then, then this\n moment effectively becomes the creation time of your cluster's oldest backup.\n\nIf you disable and subsequently re-enable continuous backup, then you cannot\nperform a point-in-time recovery until either you or AlloyDB\ncreates the cluster's first new backup. This can be an on-demand backup, or the\nfirst of the daily backups that AlloyDB takes after you enable\ncontinuous backup. For more information about backup types, see [Data backup and\nrecovery overview](/alloydb/docs/backup/overview).\n\n### Perform a point-in-time restore\n\n1. Use either the Google Cloud console or the Google Cloud CLI to perform the\n restore.\n\n ### Console\n\n 1. Go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n 2. Click a cluster in the **Resource Name**\n column.\n\n 3. Click **Data protection**.\n\n 4. Under **Restore from a point in time** , click **Restore**.\n\n 5. In the **Target time** field, enter the date and time to restore from.\n\n 6. In the **Cluster ID** field, enter a name for the new cluster.\n\n 7. In the **Network** field, select a Virtual Private Cloud network for the new\n cluster to use.\n\n 8. If you want to encrypt this cluster's continuous backups and\n data-change logs using a [customer-managed encryption key\n (CMEK)](/alloydb/docs/cmek) instead of the default Google-managed\n encryption, follow these additional steps:\n\n 1. Click **Advanced encryption options**.\n\n 2. Click the **Customer-managed encryption key (CMEK)** radio\n button.\n\n 3. Click the **Select a customer-managed key** list, and select a\n key.\n\n 9. Click **Restore**.\n\n ### gcloud\n\n Use the [`gcloud alloydb clusters\n restore`](/sdk/gcloud/reference/alloydb/clusters/restore) command,\n specifying a cluster and a timestamp. Note that, unlike [restoring from a\n backup](/alloydb/docs/backup/restore), a point-in-time recovery requires the original cluster to\n still exist. You cannot perform this kind of restore on a deleted cluster. \n\n gcloud alloydb clusters restore \u003cvar translate=\"no\"\u003eNEW_CLUSTER\u003c/var\u003e \\\n --source-cluster=\u003cvar translate=\"no\"\u003eSOURCE_CLUSTER\u003c/var\u003e \\\n --point-in-time=\u003cvar translate=\"no\"\u003eTIMESTAMP\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\n This command returns an operation, whose status you can query using the\n [`gcloud alloydb operations describe`](/sdk/gcloud/reference/alloydb/operations/describe) command. \n\n gcloud alloydb operations describe \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNEW_CLUSTER\u003c/var\u003e:\n The ID to use with the new cluster.\n\n - \u003cvar translate=\"no\"\u003eSOURCE_CLUSTER\u003c/var\u003e: The ID of the cluster\n to recover data from. \n\n To restore from a cluster in a different project, replace with the full\n cluster path in the following format: \n\n `projects/`\u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eSOURCE_REGION\u003c/var\u003e`/clusters/`\u003cvar translate=\"no\"\u003eSOURCE_CLUSTER\u003c/var\u003e\n\n - \u003cvar translate=\"no\"\u003eTIMESTAMP\u003c/var\u003e: A description\n of the point in time to recover data from, expressed in [RFC 3339\n format](https://datatracker.ietf.org/doc/html/rfc3339)---for\n example, `2012-11-15T16:19:00.094Z`. You can specify a fractional\n second as small as a microsecond.\n\n Note that this timestamp must exist within the retention period you\n specified when you created the cluster.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: The region that contains the source\n cluster, and where AlloyDB creates the new cluster.\n For example: `us-central1`.\n\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project where the new cluster is.\n\n If you want to encrypt the\n new cluster's data with a [customer-managed encryption key\n (CMEK)](/alloydb/docs/cmek) instead of Google-managed encryption,\n then you must provide these additional arguments:\n - `--kms-key=`\u003cvar translate=\"no\"\u003eKEY_ID\u003c/var\u003e: The ID of the CMEK key to use. \\* `--kms-keyring=`\u003cvar translate=\"no\"\u003eKEYRING_ID\u003c/var\u003e: The ID of the key's key ring. \\* `--kms-location=`\u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The ID of that keyring's region. Note that it must match the cluster's region.\n - `--kms-project=`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the keyring's project.\n\n To restore to a cluster with Private Service Connect enabled, make sure that you add the `--enable-private-service-connect` flag.\n2. After AlloyDB finishes creating the cluster, [create a\n primary instance for it](/alloydb/docs/instance-primary-create). That\n instance lets you access the restored data. Note that the new instance's\n configuration need not exactly match that of the original primary instance.\n\n3. Optional: [Create read-pool instances.](/alloydb/docs/instance-read-pool-create)\n\nYou can start using the cluster after the restore operation completes.\n\nWhat's next\n-----------\n\n- [Restore a cluster from a stored backup.](/alloydb/docs/backup/restore)\n- [Create a read pool instance.](/alloydb/docs/instance-read-pool-create)\n- [Create a secondary cluster and instance.](/alloydb/docs/cross-region-replication/work-with-cross-region-replication)"]]