[英]Restore or Overwrite existing SQL Server DB in AWS RDS using .BAK File from AWS S3 Bucket
是否可以使用 AWS S3 存儲桶中的.BAK 文件在 AWS RDS 中恢復或覆蓋現有的 SQL 服務器數據庫?
錯誤:
消息 50000,級別 16,State 1,過程 msdb.dbo.rds_restore_database,第 162 行 [批處理開始行 2] 數據庫“USERDB”已經存在。 不允許使用僅區分大小寫或重音的兩個數據庫。 選擇不同的數據庫名稱。
謝謝! 小號
是的,我們可以從.bak 文件中恢復。 通過 SSMS 在主數據庫中運行以下亞馬遜程序以從 S3 存儲桶恢復。
exec msdb.dbo.rds_restore_database
@restore_db_name='Database_unique_name_tobe_created',
@s3_arn_to_restore_from='arn:aws:s3:::your-s3/Old_Database.bak'
-- @restore_db_name – The name of the database to restore. Database names are unique. You can't restore a database with the same name as an existing database.
-- @s3_arn_to_restore_from = Backup file S3 bucket path
參考:- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.