Restore Your Website With EC2 Instance using AWS Backup Service.
AWS BACKUP/RESTORE
Amazon Web Services (AWS) announced its new AWS Backup service which is designed to centralize and automate the backing up of data across AWS services in the AWS cloud as well as on-premises using the AWS Storage Gateway. This is Amazon’s first attempt to create a single solution that orchestrates and manages the life cycle of backups across their services.
AWS Backup provides a single resource for all types of backups in the cloud. A solution for centralizing backups across AWS has been in high demand, and Amazon delivered with AWS Backup.
RESTORE A SIMPLE WEBSITE WITH an EC2 Instance.
STEP 1:- First we need a running EC2 Instance so we have to create one.
Figure-01.
STEP 2:- Select an AMI (Amazon Machine Image)
An AMI is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance. You can select an AMI provided by AWS, our user community, or the AWS Marketplace; or you can select one of your own AMIs.
Figure-02.
STEP 03:- Choose an Instance Type.
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instances are virtual servers that can run applications. They have varying combinations of CPU, memory, storage, and networking capacity, and give you the flexibility to choose the appropriate mix of resources for your applications.
Figure-03.
STEP 04:- Configure Instance Details. Configure the instance to suit your Requirements.
Figure-04.
STEP 05:- Now Add Storage .
our instance will be launched with the following storage device settings. You can attach additional EBS volumes and instance store volumes to your instance, or edit the settings of the root volume. You can also attach additional EBS volumes after launching an instance, but not instance store volumes.
Figure-05.
STEP 06:- Add Tags
Tag is defined with key and value where KEY = Name & Value = Webserver.
Figure-06.
STEP 07:- Configure Security Group and Select create a new Security group .
And keep the Security group for all traffic or we can use SSH and HTTP only .
Figure-07.
STEP 08:- Review Instance Launch And Launch .
Figure-09.
STEP 09:- Select an Existing key pair or create a new key pair And Launch Instance.
Figure 10.
STEP 10:- View Launch Instance Status if running then connect to instance.
Figure-11.
Figure-12.
STEP 11:- Now your instance is connected with Linux.
( You can also use putty or SSH client like Bash , CMD, Powershell )
Figure-13.
STEP 12:- Now log in as root user or you can use Sudo command .
For log in as root user give command ( sudo su — )
Figure-14.
STEP 13:- We need to install webserver so install httpd apache webserver.
And command is ( yum install httpd –y )
Figure-15.
STEP 14:- Now create a html file and save it on html folder path i.e . (/var/www/html ).
Figure-16.
STEP 15 :- By using Vim create a simple “Hello world webpage “ in index.html file
Figure-17.
Figure-18.
STEP 16:- Now you can check your website by using your public ip .
Just copy and paste it on the browser .
Figure-19.
STEP 17:- Now it’s time to restore the Website , so first go to AWS services and select the AWS Backup service.
Figure-21.
STEP 18:- Then go to AWS Backup Dashboard.
Figure-22.
STEP 19:- Select create an — on demand backup.
Figure-23.
STEP 21:- Click on create new Backup vault and give Backup vault name and select Encryption key i.e. default AWS/Backup and click on create Backup vault.
Figure -25.
STEP 22:- Then Click on create on demand Backup.
Figure-26.
STEP 23:- Now we can see our Backup Job is ready and it’s running.
Figure -27.
STEP 24:- We have 3 types of Backup plans .
we choose option Start from an existing plan .
Figure -29.
STEP 25:- Choose template i.e. daily-weekly-Monthly-yrs-Rentation.
And give Backup Plan Name
STEP 26:- Now we have to edit our Backup rule as per your choice.
(i) Daily-Backup (Select your Backup Vault which previously you have created.)
Figure-31.
(ii) Weekly-Backup
Select your Backup vault .
Figure-32.
(iii) Monthly-Backup
Select your Backup Vault
Figure-33.
And last Click on Create Plan , Now we can see our Backup Plan is Ready.
Figure-34.
Now give Resource Assignment Name and Select Assign by i.e. Resource ID. Select Resource type (EC2) and Instance Id.
Figure-36.
Now AWS Backup will backup according to our assigned plan.
Now you can see our Protected Resource is ready.
Figure-38.
STEP 28:- Now we are ready to Restore our EC2 instance.
Now click on the Resource ID and Select the instance and recovery point .
Figure-39.
STEP 29 :- Now click on the Restore and AWS will pre-fill the restore configuration to match the original EC2 instance. You can change things like the AZ, subnet, security groups, user data or instance size before restoring if required.
Figure-40.
The restored EC2 was domain joined and accessible without any additional work. Customisations to the instance were maintained, however, tags and CloudWatch alarms were not restored and will need to be applied post-restore.
Figure-42.
STEP 30:- Now finally our Restore EC2 instance is running now we can check our Restore website is working or not so, copy the Public ip and paste it on browser.
Figure-43.
Now finally we can see our Restore website is Running.