简体   繁体   中英

Amazon RDS - Restore SQL Server Differential Backup

We are running SQL Server in Amazon RDS. Our production system makes full backups daily, and differential backups hourly. The RDS documentation here describes how to create a differential backup.

exec msdb.dbo.rds_backup_database 
        @source_db_name='database_name', 
        @s3_arn_to_backup_to='arn:aws:s3:::bucket_name/file_name_and_extension',
        @overwrite_S3_backup_file=1,
        @type='differential';

However, I cannot figure out how to restore a differential backup. I have restored the full backup, and now I want to add the changes from the differential backup. When I use the stored procedure described in the documentation, I get the following error. My searches have returned no additional information. Is this feature even supported?

DECLARE @backup_name varchar(max) = 'arn:aws:s3:::db-backups/my-differential.bak';

exec msdb.dbo.rds_restore_database
@restore_db_name='existing_db',
@s3_arn_to_restore_from=@backup_name

Msg 50000, Level 16, State 0, Procedure msdb.dbo.rds_restore_database, Line 81 [Batch Start Line 0] Database existing_db already exists. Cannot restore database with the same name.

Amazon RDS for SQL Server now supports differential restores and log restores on to an RDS SQL Server db instance. With this enhancement you can now migrate to RDS for SQL Server while significantly increasing the availability of your application during the migration process.

Depending on your business needs you can decide if you want to do log restores or just a full restore followed by a differential restore. To learn more about this enhancement please visit documentation. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html

I have the same question in mind upon reading the document. AWS didn't mention this in the limitation section. Please get back if you AWS allow to overwrite the database name during restore procedure.

Msg 50000, Level 16, State 0, Procedure msdb.dbo.rds_restore_database, Line 81 [Batch Start Line 0] Database existing_db already exists. Cannot restore database with the same name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM