[[["わかりやすい","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-03 UTC。"],[],[],null,["# About restoring an instance\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/backup-recovery/restore \"View this page for the MySQL database engine\") \\| [PostgreSQL](/sql/docs/postgres/backup-recovery/restore \"View this page for the PostgreSQL database engine\") \\| SQL Server\n\n\u003cbr /\u003e\n\nThis page provides information to review before restoring an instance\nfrom a backup or performing a point-in-time recovery (PITR).\n\nWhat happens during a restore?\n------------------------------\n\nWhen you restore an instance, the following data from the primary instance\nare restored to the new instance:\n\n- Databases\n- Users\n\n| **Note:** The flags from the primary instance are not restored. Any flags previously set on the target instance are retained after the restore.\n\nThe restore operation causes the instance to restart.\n\nPoint-in-time recovery (PITR)\n-----------------------------\n\nPoint-in-time recovery (PITR) helps you recover an instance to a specific point in\ntime. For example, if an error causes a loss of data, you can recover a database\nto its state before the error occurred.\n\nPITR always creates a new instance; you can't perform a\nPITR to an existing instance. The new instance inherits the\nsettings of the source instance, similar to how\n[clone creation](/sql/docs/sqlserver/clone-instance) works.\n\n\u003cbr /\u003e\n\nCloud SQL uses transaction logs for PITR. If you enable PITR for an instance, and then restore the instance from a backup, Cloud SQL deletes the transaction logs that let you use PITR from the restored instance.\n\nTo ensure that logs for your instance are stored in Cloud Storage instead of on disk, complete the following actions:\n\n- [Check the network architecture of the instance](/sql/docs/sqlserver/upgrade-cloud-sql-instance-new-network-architecture#check-single-instance). If the instance is on the old network architecture, then [upgrade it to the new network architecture](/sql/docs/sqlserver/upgrade-cloud-sql-instance-new-network-architecture#upgrade-network-architecture).\n- If the size of your logs on disk is causing performance issues for your instance, then deactivate PITR and re-enable it.\n\n| **Caution:** If you deactivate and re-enable PITR, then any existing logs are deleted, and you won't be able to perform PITR earlier than the time that you re-enabled it. Enabling and deactivating PITR requires restarting the database.\n\nFor step-by-step instructions for performing PITR, see [Use point-in-time recovery (PITR)](/sql/docs/sqlserver/backup-recovery/pitr).\n\n### Restore an unavailable instance\n\nYou can use PITR to restore a Cloud SQL instance that isn't available. PITR typically offers a recovery point objective (RPO) of five minutes or less.\n\nIf the instance is unavailable, then you can use the API to [check for the latest time](/sql/docs/sqlserver/backup-recovery/pitr#get-the-latest-recovery-time) to which you can restore the instance and perform the recovery to that time. If the zone in which the instance is configured isn't accessible, then you can [restore the instance to a different primary or secondary zone](/sql/docs/sqlserver/backup-recovery/pitr#perform-PITR-unavailable-instance) by providing values for the preferred zones.\n\nSuppose a Cloud SQL instance becomes unavailable at 4 PM EST. If the latest recovery time is at 3:55 PM EST, then you can recover the instance up to this time.\n\nGeneral tips about performing a restore\n---------------------------------------\n\nWhen you restore an instance from a backup, whether to the same instance or to\na different instance, keep in mind the following items:\n\n- The restore operation overwrites all data on the target instance.\n- The target instance is unavailable for connections during the restore operation; existing connections are lost.\n- If you are restoring to an instance with read replicas, you must delete all replicas and recreate them after the restore operation completes.\n- The restore operation restarts the instance.\n\nFor step-by-step instructions for performing a restore, see:\n\n- [Restoring an instance](/sql/docs/sqlserver/backup-recovery/restoring)\n\nTips and requirements for restoring to a different instance\n-----------------------------------------------------------\n\nWhen you are restoring a backup to a different instance, keep in mind the\nfollowing restrictions and best practices:\n\n- The target instance must have the same database version as the instance from which the backup was taken.\n\n \u003cbr /\u003e\n\n- Cloud SQL always sets the storage capacity of the target instance to the\n maximum value of the size of both the configured disk and the backup disk. The\n backup disk is the size of the disk when the backup is taken.\n\n- The storage capacity of the target instance must be at least as large as the\n *capacity* of the instance being backed up. The amount of storage used does\n not matter. You can see the storage capacity of the instance in the console\n [Cloud SQL\n instances page](https://console.cloud.google.com/sql/instances).\n This requirement applies whether or not you are doing\n PITR of a single database.\n\n- The target instance must be in the `RUNNABLE` state.\n\n- The target instance can have a different number of cores or amount\n of memory than the instance from which the backup was taken.\n\n- The target instance can be in a different region from the source instance.\n\n- During an outage, you can still retrieve a list of backups in a particular\n project. See [Viewing backups during an outage](/sql/docs/sqlserver/backup-recovery/backing-up#backuplist).\n\nRestore rate limitations\n------------------------\n\nYou are allowed a maximum of three restore operations every 30 minutes per\ninstance per region per project. If a restore operation fails, it does not count\ntowards this quota. If you reach the limit, the operation fails with an error\nmessage that tells you when you can run the operation again.\n\nLet's take a look at how Cloud SQL performs rate limiting for restores.\n\nCloud SQL uses tokens from a bucket to determine how many restore operations\nare available at any one time. For each backup, there's a bucket for each target\nproject and target region. The target instances from the same project share one bucket if they are in the same region.\nThere's a maximum of three tokens in each bucket that you can use for restore operations. Every 10 minutes, a new token is added to the bucket. If the bucket\nis full, the token overflows.\n\nEach time you issue a restore operation, a token is granted from the bucket. If\nthe operation succeeds, the token is removed from the bucket. If it fails, the\ntoken is returned to the bucket. The following diagram shows how this works:\n\nFor example, in the following figure, Backup1, Backup2, and Backup3 are the\nbackups from the same source instance.\n\n- Each backup (Backup1, Backup2, and Backup3) has its own bucket of tokens for restore operations that target different instances in Project 1 in Region A (Bucket11A, Bucket21A, and Bucket31A). Because each backup has its own bucket, you can restore each backup to the same instance three times every thirty minutes.\n- Each backup has a bucket for a separate project and for a separate region. For example, if there are five projects in a region, there are five buckets for that backup in that region, one in each project. In the previous figure, we have two projects in region A: Project 1 and Project n.\n - Backup1 has two buckets of tokens for restore operations in Region A. One bucket for Project 1 (Bucket11A), and one bucket for Project n (Bucket1nA).\n - Similarly, Backup3 has two buckets for restore operations in Region A. One for Project 1 (Bucket31A) and one for Project n (Bucket3nA).\n- Backup3 has one bucket in Region B, for Project1, because all instances in the same target project and the same target region share one bucket.\n\nWhat's next\n-----------\n\n- [Perform a restore from a backup](/sql/docs/sqlserver/backup-recovery/restoring#restorebackups)\n- [Use point-in-time recovery (PITR)](/sql/docs/sqlserver/backup-recovery/pitr)"]]