为 Aurora Serverless 集群禁用自动备份

disabling automated backups for Aurora Serverless cluster

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html表示使用PreferredBackupWindowif automated backups are enabled using the BackupRetentionPeriod parameter.

还说 BackupRetentionPeriod Must be a value from 1 to 35.

实际上可以禁用自动备份吗?使用 CloudFormation return 将 BackupRetentionPeriod 设置为 0 出现以下错误:Invalid backup retention period: 0. Retention period must be between 1 and 35.

不幸的是,you can't disable automated backups on Aurora。即使您想通过使用

查找最新备份来解决此问题
aws rds describe-db-cluster-snapshots --db-cluster-identifier=dbname | jq -r .DBClusterSnapshots[].DBClusterSnapshotIdentifier | tail -n1

然后尝试使用

手动删除备份
aws rds delete-db-cluster-snapshot --db-cluster-snapshot-identifier rds:dbname-2021-03-30-04-56

这会导致错误

An error occurred (InvalidDBClusterSnapshotStateFault) 
when calling the DeleteDBClusterSnapshot operation: 
Only manual snapshots may be deleted.

您的数据库实例似乎有一个只读副本。不幸的是,由于实例连接了只读副本,您将无法将备份保留设置为 0。创建和管理只读副本二进制日志需要备份。

“在数据库实例可以作为复制源之前,您必须通过将备份保留期设置为 0 以外的值来在源数据库实例上启用自动备份。此要求也适用于只读副本另一个只读副本的源数据库实例。"