Backup SQL Server Database on RDS with SQL Server Agent on S3 Bucket

0

Hello,

I have one database in RDS on SQL Server, i have also enabled SQL Sever Agent. I want to perform daily backup ( so i want to add cron job) on the database to S3 via the SQL Server Agent.

How is the procedure?

Thank you a lot!

1개 답변
0

First of all you will need to setup the option group and specify an IAM role which has the correct access to the S3 bucket and keys.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.Options.BackupRestore.html

Then your agent will need to execute the SQL command eg:-

exec msdb.dbo.rds_backup_database
	@source_db_name='database_name',
	@s3_arn_to_backup_to='arn:aws:s3:::bucket_name/file_name.extension',
	[@kms_master_key_arn='arn:aws:kms:region:account-id:key/key-id'],	
	[@overwrite_s3_backup_file=0|1],
	[@type='DIFFERENTIAL|FULL'],
	[@number_of_files=n];

You can get away with only specifying the mandatory options only.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html#SQLServer.Procedural.Importing.Native.Using.Backup

profile picture
전문가
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인