Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
Forked from RobsonAutomator/restoreDB.sql
Created March 29, 2021 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisMcKee/78cd8f65ae03933d4156cefabb614db9 to your computer and use it in GitHub Desktop.
Save ChrisMcKee/78cd8f65ae03933d4156cefabb614db9 to your computer and use it in GitHub Desktop.
restore RDS database from S3
-- Change [bucket] with your bucket name
exec msdb.dbo.rds_restore_database
@restore_db_name='Sitecore_Analytics',
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Analytics.bak';
exec msdb.dbo.rds_restore_database
@restore_db_name='Sitecore_Core',
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Core.bak';
exec msdb.dbo.rds_restore_database
@restore_db_name='Sitecore_Master',
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Master.bak';
exec msdb.dbo.rds_restore_database
@restore_db_name='Sitecore_Web',
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Web.bak';
exec msdb.dbo.rds_restore_database
@restore_db_name='Sitecore_Sessions',
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Sessions.bak';
-- Check status of restore operation
exec msdb.dbo.rds_task_status @db_name='Sitecore_Core'
exec msdb.dbo.rds_task_status @db_name='Sitecore_Master'
exec msdb.dbo.rds_task_status @db_name='Sitecore_Web'
exec msdb.dbo.rds_task_status @db_name='Sitecore_Analytics'
exec msdb.dbo.rds_task_status @db_name='Sitecore_Sessions'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment