Attatch a new EBS volume with running instance to make Backup

Posted By : Arvind Das | 19-Jun-2012

In this article , I'm explaining how to extend your ebs machine volume. Let the EBS  volume created is: /dev/sdf and you are creating one volume.

Now take back up of   /opt

	#mkdir /opt_backup
	#cp /opt /opt_backup>
    
  • Login to your instance using your terminal.
  • type fdisk /dev/sdf
  • At "Command" type n
  • At "Primary or Extended" type p
  • At Number of volumes type 1
  • Press "Return" two times to accept the default cylinder values
  • Press "w" to write the partition table and exit
  • Type "mkfs.ext3 /dev/sdf" to format an ext3 file system
  • Type mount /dev/sdf /opt to mount the drive
  • edit /etc/fstab to add the drive mount to automount at boot.
  • vi /etc/fstab
    

    add this line:

    /dev/sdf /opt ext3 defaults 0 0
    
  • You have successfully attatched a new volume to your running instance.
  •     Type “df -h” in terminal to check it
  • copy back data from /opt_backup to /opt
  • #cp /opt_backup /opt
    

About Author

Author Image
Arvind Das

Technical Product Manager experienced in developing Real Time Planning Solutions, Video CMS with experience in Product Management and technical expertise in Reactive applications , Micro-services . Spending most of his time in planning , new solutions.

Request for Proposal

Name is required

Comment is required

Sending message..