Monday, June 17, 2013

How to connect a domain name to an EC2 instance

Launch an EC2 instance and set up the web server (In my case, I setup the Ubuntu12.04 instance and install the Apache web server on it):



At this point my website is up and running but with the long amazon url(i.e. ec2-53-245-237-89.compute-1.amazonaws.com):



Each EC2 server is assigned a dynamic IP. If a server has to be restarted, it is given a new dynamic IP and we have to remember this new long string each time to access our web server.

To overcome this problem, we can create free domain with www.dot.tk and map it with our web server. For this, allocate an Elastic IP and associate it with the instance.



Then right click on the Elastic IP and select the “Associate“, and choose the instance that we created above:





Now we have an elastic IP which is a number that looks like 175.141.242.55. Copy this number because we will use it in next step:



Login to the dot.tk site and navigate to this panel:



Add the elastic IP against the “A Record” entries:



Finally, we need to wait sometime (few minutes to an hour) for it all to propagate through.After that our domain should now start resolving to the web server we have on EC2:



Hope this will help you!

Part-4: Restore disk from Clonezilla Auto Restore CD/DVD

Please read the Part-1,2 and 3 before starting this tutorial, in order to get the better understanding.

1) At first, Clonezilla auto restore CD/DVD comes up with this screen just press ENTER:

1

2) Before starting the restoration process, Clonezilla will confirm from you TWICE, If you are sure that everything is fine, than just type “y” twice and press ENTER:

2

3

3) After the second confirmation, Clonezilla will start restoring the image to the selected target hard disk:

4

4) Once the cloning process will complete, Clonezilla will show you the summary, than type 1 to “Reboot” the system. Please also “Remove the Clonezilla auto restore CD/DVD” and press ENTER:

5

5) If everything goes well, your newly restored system will boot normally as per your desire:

6

Hope this will help you!

Part-3: Restore an image of a Hard drive using Clonezilla

In this tutorial, we’ll check that how to restore an image of a hard drive using the Clonezilla, that we have created in the Part-1 and stored it on the SSH Server.

Note: One of Clonezilla’s “Limitations” is that the destination disk must be the same size or larger than the source disk that we have been cloned, so make sure that the destination disk must be the same size or larger.

To restore an image of a hard drive, boot the system from the Clonezilla Live CD and follow the exact same procedure from step 1 to until step 15, that we have performed in Part-1.

1) On step 16, select the “restoredisk” option and press ENTER:

1

2) Select the image (In my case,it reside on SSH Server) that you want to restore:

2

3) In this step, select the target disk on which, you want to restore the image:

3

4) It will prompt you the command to restore the image, just press ENTER:

4

5) Before starting the restoration process, Clonezilla will confirm from you TWICE, If you are sure that everything is fine, than just type “y” twice and press ENTER:

5

6

6) After the second confirmation, Clonezilla will start restoring the image to the selected target hard disk:

7

7) Once the cloning process will complete, Clonezilla expect an ENTER to continue:

8

8) Than type 1 to “Reboot” the system. Please also “Remove the Clonezilla Live CD” and press ENTER:

9

9) If everything goes well, your newly restored system will boot normally as per your desire:

10

Hope this will help you!

Part-2: Creation of autorun recovery Clonezilla live CD/DVD from image

In the first part, we have created the Clonezilla image and store it on SSH Server. In this part, we’ll create the autorun recovery Clonezilla live DVD from that image.

Note: You need to go through the same process again from step 1 to until step 15, that we have performed in Part-1.

1) Select the “recovery-iso-zip” and press ENTER:

1

2) In the next screen, select the image folder (This is the image folder that we have created in part 1):

2

3) Choose the destination disk to be recovered when the recovery DVD being used:

3

4) Select the language that will be used in the recovery Clonezilla live:

4

5) Set the keyboard layout when the recovery DVD is used, default is NONE:

5

6) Select “iso” to create a DVD disk image which can burn on a DVD disc:

6

7) It displays a single command that will be executed, press ENTER to continue:

7

8) It will display a warning for confirmation that you want to continue, press “y“:

8

9) Creation of the iso image begin:

9

10) After the sucessful creation of iso image, Clonezilla will display a summary, press ENTER to continue:

10

11) Finally, select an option (poweroff, reboot etc),Don’t forget to remove the CloneZilla Live CD from the CD drive:

11

Verification of iso image on SSH Server:

check

Hope this will help you!

Part-1: Creation of Hard drive image using Clonezilla

clonezilla

Scenario:

The scenario is really simple, in which I want to backup my Ubuntu server using the “CloneZilla Live” and also want to store it on another server which has an ip address of 192.168.179.141. If you want to learn more about CloneZilla, please visit this link.

Let’s start the tutorial by inserting the CloneZilla Live CD into the server that you want to backup and boot from it.

1) At first, CloneZilla Live comes up with this screen just press ENTER:

1

2) Next, select your desired language:

2

3) If you are using US keymap, just select the default option “Don’t touch keymap” and press ENTER:

3

4) Select “Start Clonezilla” and press ENTER:

4

5) Select “device-image” and press ENTER:

5

6) Here we’ll select that where we want to store the hard drive image. In my case, I have selected SSH server:

6

7) Here, it will ask the network setting (I have selected dhcp):

7

8) Then it will ask the SSH server address (In my case, it is 192.168.179.141):

8

9) Next ssh port (default is 22):

9

10) User account on SSH Server that is allowed to write/read on the server:

10

11) Specify the directory on SSH Server, where CloneZilla image will be saved(In my case, it is /home/arbab/clonezilla):

11

12)Next click on OK:

12

13)and then enter your SSH password:

12a

14) Next screen will confirm the successfully mount. Press “Enter“:

13

15) Choose “Beginner” then hit Enter:

14

16) Select “savedisk” because, we want to create an image of the full hard drive:

15

17) Input the name that you want to give to your image (default is just fine for me):

16

18) Choose the hard drive for which you want to create an image:

17

19) Select an option, if you want to check & repair the file system before saving (I am going with default option, which is skip):

18

20) Select this option, if you want to check the saved image is restorable:

19

21) Hit Enter:

20

22) Then press “y” and Hit Enter to start the image creation process:

21

After this, image creation process will start (please be patient, this may take some time):

23

23) After the successful image creation, press ENTER:

24

24) Select your desired option to Poweroff/Reboot etc the CloneZilla Live system:

25

Login to SSH Server and verify the disk image:

26

Hope this will help you!