Skip to content
63 changes: 63 additions & 0 deletions tidb-cloud/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,69 @@ To apply a manual backup to your TiDB Cloud Dedicated cluster, perform the follo

4. Click **Confirm**. Then your cluster data is backed up.

### Export backups

<div label="Amazon S3">

To export a specific backup to cloud storage, such as and Google Cloud Storage, perform the following steps:
Comment thread
hfxsd marked this conversation as resolved.
Outdated

<SimpleTab>

<div label="Amazon S3">

Comment thread
hfxsd marked this conversation as resolved.
1. Navigate to the [**Backup**](#view-the-backup-page) page of your cluster.

2. Locate the backup you want to export, and click **...** > **Export** in the **Action** column.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

3. In the **Export Backup to AWS S3** dialog, enter the **Folder URI**, and then select a region for the backup bucket.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

4. Click **Generate Command** to see the command for configuring permissions.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

- **With AWS CLI**:

Execute the generated command on AWS to grant TiDB Cloud access to your Amazon S3 bucket.

- **With AWS Console**:

1. Navigate to the [Amazon S3 console](https://console.aws.amazon.com/s3/).
2. Go to the bucket detail page, and then switch to the **Permissions** tab.
Comment thread
hfxsd marked this conversation as resolved.
Outdated
3. Scroll down to **Bucket Policy**, and then click **Edit**.
Comment thread
hfxsd marked this conversation as resolved.
Outdated
4. Copy the policy content from the generated command, and then paste it into the policy editor.
5. Click **Save Changes**.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

5. Click **Export** to start the export process.

</div>

<div label="Google Cloud Storage">

To export a specific backup to Google Cloud Storage, perform the following steps:
Comment thread
hfxsd marked this conversation as resolved.
Outdated

1. Navigate to the [**Backup**](#view-the-backup-page) page of your cluster.

2. Locate the backup you want to export, and then click **...** > **Export** in the **Action** column.

3. In the **Export Backup to Google Cloud Storage** dialog, note down the **Google Cloud Service Account ID**, which is required for a later step.

4. In the [Google Cloud console](https://console.cloud.google.com/), create a custom IAM role, or make sure that an existing role has the following permissions:
Comment thread
hfxsd marked this conversation as resolved.
Outdated

- `storage.buckets.get`
- `storage.objects.list`
- `storage.objects.create`
- `storage.objects.delete`

5. In **Cloud Storage** > **Buckets**, select the target bucket, and then go to **Permissions** > **Grant Access**.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

6. In **New principals**, enter the **Service Account ID** that you noted down in Step 3, select the role from Step 4, and then click **Save**.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

7. Switch to the **Configuration** tab, copy the **gsutil URI**, and then paste it into the **Export Path** field in the **Export Backup to Google Cloud Storage** dialog. You can append a path suffix to the URI to create a subdirectory.
Comment thread
hfxsd marked this conversation as resolved.
Outdated

8. Click **Export** to start the export process.

</div>

</SimpleTab>

### Delete backups

#### Delete backup files
Expand Down