Installing Umbraco on Amazon AWS.
In this post, I will show you have to upload and restore your database on Amazon RDS, although this blog is under Umbraco, it's the same steps for any SQL Server database.
First, we need to back up our database, to do this we right-click on the database we want to back up and from the pop-up, select 'tasks' then 'backup' as shown below.
Once the backup is complete, remember the locations as we will need to go to the location to upload the database to Amazon.
Create the AWS Bucket
If you have not already done so, you need to create an account with Amazon, once that is completed, go to https://console.aws.amazon.com/s3/ and create a bucket.
The screenshot below shows how to proceed with setting the bucket up; I have not gone through how this is done as your requirements may be different to mine.
Once you have created the bucket, click on the name and on the next page click upload, navigate to the location of your database backup and then upload to Amazon.
Create the database
Now that the database is uploaded in the bucket you created go to https://console.aws.amazon.com/rds/, in the top left you will see the menu, select 'Instances' and on the next screen 'Create Database'.
- Select Microsoft SQL Server and then in Edition select SQL Server Web Edition (NOTE I believe the Express Edition is not powerful enough to run Umbraco) and click next
- Complete the requirements that best meet your needs, and in settings, enter a DB Instance identifier with username and password and click next.
On the next page, complete all the fields as required, taking note of Database options' option group' as we will be coming back to this.Once done, Amazon will start to create the database, so head back to the dashboard.
While this is happening, click on 'Option groups' and then 'create group', and complete the form. Once back select the Option group you created and then select 'Add Option'.
We need to ensure that the option 'SQLSERVER_BACKUP_RESTORE is selected and then complete the form.
- IAM role: select yes and give it a name.
- S3 Bucket: select the bucket you created.
- Apply Immediately: select YES.
Then click Add Option.
Hopefully, the database will be created now, so we can tick the circle next to the name and then select 'Instance actions', modify.
Scroll down to 'Database options' and in 'option group' select the name of the option group you created earlier, then click continue.
Next page 'Scheduling of modification' click apply immediately and then click 'Modify DB Instance'.
Now click the DB Instance name and on the next page find your endpoint.
Click on SQL Management Studio and enter the endpoint into the server name with the port number at the end.
NOTE the comma with 1433
Authentication: SQL Server and enter the username and password you created earlier.
If all went well, you can now log in to your database on Amazon RDS, copy the following code into a new query window.
- Replace 'database_name' with the name of the database you want to restore
- bucket_name: name of the bucket you created earlier.
- file_name_and_extension: the name of the database you uploaded
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';
If all goes well, you should see the following showing that the restore is taking place.
The above shows how to add Umbraco 7 to an Amazon AWS, I hope you found this post helpful.