无法使用RDS SQL Server从S3还原

时间:2018-02-09 13:26:58

标签: amazon-web-services amazon-rds

我正在尝试从AWS RDS(SQL Server)中的S3进行还原。在我可以选择引擎的页面上,我选择了SQL Server。但选择版本的选项都显示为灰色,我无法选择一个并继续前进。您可以从下面的屏幕截图中看到这一点。注意,如果我只是尝试在RDS中创建SQL Server实例,则不会发生这种情况。然后我可以选择一个版本。

enter image description here

1 个答案:

答案 0 :(得分:1)

看起来您无法直接从控制台执行此操作,数据库必须已经存在。

  

恢复数据库

     

要恢复数据库,请调用存储的rds_restore_database   过程

     

需要以下参数:

@restore_db_name – The name of the database to restore.

@s3_arn_to_restore_from – The Amazon S3 bucket that contains the backup file, and the name of the file.
     

以下参数是可选的:

@kms_master_key_arn – If you encrypted the backup file, the key to use to decrypt the file.
     

没有加密的示例

exec msdb.dbo.rds_restore_database 
    @restore_db_name='database_name', 
    @s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension';
     

加密示例

exec msdb.dbo.rds_restore_database 
        @restore_db_name='database_name', 
        @s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension',
        @kms_master_key_arn='arn:aws:kms:region:account-id:key/key-id';

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html