首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在CLI中将AWS-RDS aurora数据库恢复到指定时间?

如何在CLI中将AWS-RDS aurora数据库恢复到指定时间?
EN

Stack Overflow用户
提问于 2018-01-13 19:12:56
回答 1查看 496关注 0票数 1

我想将我的Aurora数据库恢复到指定的时间。我已经启用了自动备份。我尝试了官方用户指南(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html)中的以下脚本:

代码语言:javascript
复制
aws rds restore-db-instance-to-point-in-time \
    --source-db-instance-identifier mysourcedbinstance \
    --target-db-instance-identifier mytargetdbinstance \
    --restore-time 2018-01-12T23:45:00.000Z

我得到了以下错误:

代码语言:javascript
复制
An error occurred (PointInTimeRestoreNotEnabled) when calling the RestoreDBInstanceToPointInTime operation: Point-in-time restore is not enabled for this database instance. To enable point-in-time restore, use ModifyDBInstance to set the backup retention period to a non-zero value.

源实例的BackupRetentionPeriod属性为30。

根据AWS控制台,此恢复时间介于“最早恢复时间”和“最新恢复时间”之间:

我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2018-01-14 00:11:12

如果你看看这里的例子,我认为你的CLI命令是不正确的,错误消息也很糟糕。特别是,你的时间看起来很糟糕。

https://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-to-point-in-time.html

尝试:

aws rds restore-db-instance-to-point-in-time \ --source-db-instance-identifier mysourcedbinstance \ --target-db-instance-identifier mytargetdbinstance \ --restore-time 2018-01-12T23:45:00Z

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48239306

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档