

# 监控数据库集群导出任务
<a name="export-cluster-data.Monitoring"></a>

您可以使用 AWS 管理控制台、AWS CLI 或 RDS API 监控数据库集群导出。

## 控制台
<a name="export-cluster-data.MonitorConsole"></a>

**监控数据库集群导出**

1. 登录 AWS 管理控制台 并通过以下网址打开 Amazon RDS 控制台：[https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)。

1. 在导航窗格中，选择 **Exports in Amazon S3**（Amazon S3 中的导出）。

   数据库集群导出在 **Source type**（源类型）列中指示。导出状态显示在 **Status**（状态）列中。

1. 要查看有关特定数据库集群导出的详细信息，请选择导出任务。

## AWS CLI
<a name="export-cluster-data.MonitorCLI"></a>

要使用 AWS CLI 监控数据库集群导出任务，请使用 [describe-export-tasks](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-export-tasks.html) 命令。

以下示例说明如何显示有关所有数据库集群导出的当前信息。

**Example**  

```
 1. aws rds describe-export-tasks
 2. 
 3. {
 4.     "ExportTasks": [
 5.         {
 6.             "Status": "CANCELED",
 7.             "TaskEndTime": "2022-11-01T17:36:46.961Z",
 8.             "S3Prefix": "something",
 9.             "S3Bucket": "amzn-s3-demo-bucket",
10.             "PercentProgress": 0,
11.             "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/K7MDENG/bPxRfiCYEXAMPLEKEY",
12.             "ExportTaskIdentifier": "anewtest",
13.             "IamRoleArn": "arn:aws:iam::123456789012:role/export-to-s3",
14.             "TotalExtractedDataInGB": 0,
15.             "SourceArn": "arn:aws:rds:us-west-2:123456789012:cluster:parameter-groups-test"
16.         },
17. {
18.             "Status": "COMPLETE",
19.             "TaskStartTime": "2022-10-31T20:58:06.998Z",
20.             "TaskEndTime": "2022-10-31T21:37:28.312Z",
21.             "WarningMessage": "{\"skippedTables\":[],\"skippedObjectives\":[],\"general\":[{\"reason\":\"FAILED_TO_EXTRACT_TABLES_LIST_FOR_DATABASE\"}]}",
22.             "S3Prefix": "",
23.             "S3Bucket": "amzn-s3-demo-bucket1",
24.             "PercentProgress": 100,
25.             "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/2Zp9Utk/h3yCo8nvbEXAMPLEKEY",
26.             "ExportTaskIdentifier": "thursday-events-test", 
27.             "IamRoleArn": "arn:aws:iam::123456789012:role/export-to-s3",
28.             "TotalExtractedDataInGB": 263,
29.             "SourceArn": "arn:aws:rds:us-west-2:123456789012:cluster:example-1-2019-10-31-06-44"
30.         },
31.         {
32.             "Status": "FAILED",
33.             "TaskEndTime": "2022-10-31T02:12:36.409Z",
34.             "FailureCause": "The S3 bucket amzn-s3-demo-bucket2 isn't located in the current AWS Region. Please, review your S3 bucket name and retry the export.",
35.             "S3Prefix": "",
36.             "S3Bucket": "amzn-s3-demo-bucket2",
37.             "PercentProgress": 0,
38.             "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/2Zp9Utk/h3yCo8nvbEXAMPLEKEY",
39.             "ExportTaskIdentifier": "wednesday-afternoon-test",
40.             "IamRoleArn": "arn:aws:iam::123456789012:role/export-to-s3",
41.             "TotalExtractedDataInGB": 0,
42.             "SourceArn": "arn:aws:rds:us-west-2:123456789012:cluster:example-1-2019-10-30-06-45"
43.         }
44.     ]
45. }
```
要显示有关特定导出任务的信息，请在 `describe-export-tasks` 命令中包含 `--export-task-identifier` 选项。要筛选输出，请包括 `--Filters` 选项。有关更多选项，请参阅 [describe-export-tasks](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-export-tasks.html) 命令。

## RDS API
<a name="export-cluster-data.MonitorAPI"></a>

要使用 Amazon RDS API 显示有关数据库集群导出的信息，请使用 [DescribeExportTasks](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeExportTasks.html) 操作。

要跟踪导出工作流的完成情况或启动其他工作流，您可以订阅 Amazon Simple Notification Service 主题。有关 Amazon SNS 的更多信息，请参阅 [使用 Amazon RDS 事件通知](USER_Events.md)。