# restore_backup

Restores a backup to a Cloud SQL instance. The target_instance and target_project must be provided and populated in the request. The backup identifier can be provided in several ways: 1. A backup_run_id (which is an integer). 2. A backup URI of the format projects/{project-id}/backups/{backup-uid}. 3. A backup URI of the format projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}. Use the identifier to populate the backup_id field in the request. The source_project must be populated in the request. If the identifier is a backup_run_id, the source_project will be provided. If the identifier is a backup URI, the source_project may need to be extracted from the URI. Do not confuse the extracted source_project with the target_project, which will be provided in other ways. In addition, if the identifier is a backup_run_id, the source_instance must be provided and populated in the request. Do not try to create the instance before the restore, the restore itself will create the instance if needed. Confirm the parameters with the user before executing the restore.

Agent View of the PolicyLayer registry record for `restore_backup`. HTML page: https://policylayer.com/tools/com-googleapis-sqladmin-mcp/restore-backup

## Facts

- Tool: `restore_backup`
- Server: Mcp (`https://sqladmin.googleapis.com/mcp`) — https://policylayer.com/tools/com-googleapis-sqladmin-mcp.md
- Homepage: https://github.com/https://sqladmin.googleapis.com/mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 5 (4 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `backupId` | string | yes | Required. The identifier of the backup to restore. This will be one of the following: 1. An int64 containing a backup_run_id. 2. A backup name of the format 'pr |
| `sourceProject` | string | yes | Required. The project ID of the source instance containing the backup. |
| `targetProject` | string | yes | Required. Project ID of the target project. |
| `sourceInstance` | string | no | Optional. The Cloud SQL instance ID of the source instance containing the backup. Only necessary if the backup_id is a backup_run_id. |
| `targetInstance` | string | yes | Required. Cloud SQL instance ID of the target. This does not include the project ID. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "restore_backup",
    "arguments": {
      "backupId": "<backupId>",
      "sourceProject": "<sourceProject>",
      "targetProject": "<targetProject>",
      "targetInstance": "<targetInstance>"
    }
  }
}
```

## Why restore_backup is rated Medium

Restore operations are Write-category actions because they create or modify data reversibly. While restores change existing data, they are not Destructive (the old data is not permanently deleted, and the operation can be reversed by restoring a different backup or creating a new backup).

From the tool's own definition: "'Restores a backup to a Cloud SQL instance' — the tool modifies data within a Cloud SQL instance by restoring from a backup, which overwrites or replaces existing database state."

## Use case

AI agents use restore_backup to create or update resources in Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "restore_backup": {
      "limits": [
        {
          "counter": "restore_backup_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp (14)

- `execute_sql` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/execute-sql.md
- `execute_sql_readonly` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/execute-sql-readonly.md
- `postgres_upgrade_precheck` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/postgres-upgrade-precheck.md
- `get_instance` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/get-instance.md
- `get_operation` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/get-operation.md
- `list_instances` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/list-instances.md
- `list_users` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/list-users.md
- `clone_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/clone-instance.md
- `create_backup` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-backup.md
- `create_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-instance.md
- `create_user` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-user.md
- `import_data` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/import-data.md
- `update_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/update-instance.md
- `update_user` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/update-user.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-googleapis-sqladmin-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-googleapis-sqladmin-mcp
