Moving AWS EBS Volumes from one Region to Another Regions: A Step-by-Step Guide

Pappu Sanodiya
6 min readSep 26, 2023

--

Here’s a step-by-step guide to transfer the EBS Volume from one region to another region without loosing any data. This blog provides a comprehensive walkthrough of the process, making it easy for beginners.

EBS volume Architecture

let’s me first tell you about what is EBS volume.

EBS (Elastic Block Store) volume is like a virtual hard drive in the cloud. It provides scalable and persistent storage for your Amazon EC2 instances in AWS. You can think of it as a digital disk that you can attach to your virtual servers to store data, just like a physical hard drive in your computer.

let’s go the practical part.

Step 1: Launch an EC2 Instance in the N. Virginia Region

  • Log in to your AWS Management Console.
  • Navigate to the EC2 Dashboard and click “Launch Instance.”
  • Choose an Amazon Machine Image (AMI), I have selected Amazon Linux and configure the instance.
  • Launch the instance and confirm it’s running.
  • Here you can see our instance is running on “us-east-1a” availability zone.

Step 2: Create an EBS Volume in the N. Virginia Region

  • Click on Create volume
  • Here in the Size you can give according your requirements, I have given 1GiB
  • And in the Availability Zone make sure to select those availability zone where we have launched our instance.
  • Here you can give the Tags and click on Create volume.
  • Now select your instance and click on connect you can use other tools like GitBash, putty for login.
  • login as root user by sudo su - root
  • The fdisk -l command is used to list the partitions and their details on a Linux system.
  • here you can see only one disk is attached.
  • Now let’s attach the EBS volume, select the volume that we have created, click on action and click on Attach volume
  • Here select the instance that we have launched and click on Attach volume.
  • Connect the instance and see new disk is attached.

Step 3: Store Data in the EBS Volume

  • for storing the data in the ebs volume we have to create a partition.
  • To create a partition we have to go inside the hard disk with fdisk /dev/xvdf command.

● Type n for new partition ● type p for primary partition ● partition number 1 ● First sector enter ● command to specify the Size +100M

● Type w this command will save the partition

The lsblk command in Linux is used to list information about block devices, Here you can see one partitons is created.

Now we have to format the partition for this mkfs.ext4 command in Linux is used to create an ext4 file system.

  • now create a folder named myfold by mkdir /myfold command.
  • now we have to mount this folder to the created partition by mount /dev/xvdf1 /myfold command.
  • now we see the the list of mount folder by df -h command, here you can see our folder is mounted.
  • now go inside this folder by cd /myfold command and create a file and store the data.

Step 4: Create a Snapshot of the EBS Volume

  • for creating a snapshot select the ebs volume and click on action and click Create snapshot.
  • Give the tags and click on create snapshot.

Step 5: Copy Snapshot to the Ohio Region

  • Now copy this snapshot in which region you want, I am copying to the Ohio Region, for this select snapshot and click on action and click on Copy snapshot.
  • Select the Destination Region in my case it’s us-east-2 and click on copy snapshot .

Step 6: Create an EC2 Instance in the Ohio Region

  • Navigate to the EC2 Dashboard in the Ohio region.
  • Click “Launch Instance.”
  • Choose an AMI and configure the instance in Ohio.

Step 7: Create EBS volume from snapshot and attach to the instance.

  • In the Ohio region, go to ec3 dashboard, where click on Snapshot here you can see the one snapshot is copied from N.Virginia region.
  • Now select this snapshot and click on actions and click on Create volume from snapshot.
  • Here you can define the size of volume how many size you want according you can give, I have just given 1GiB.
  • And select Availability Zone where our instance is running in the Ohio region in my case it’s running in us-east2b AZ and click on create volume.
  • Now login to the console switch to root user and check the list of disk here you can see only one disk is attached
  • Now attach the volume to the instance, select the volume and click on actions and click on Attach volume.
  • Here select the instance which we have launched and click on attach volume.
  • now check the list of disk by fdisk -l command, here you can see one more disk is come up which size is 1GiB.
  • Now we have to format this partition by mkfs.ext4 /dev/xvdf1 command.
  • Now create a folder by mkdir /myfold command here myfold is just a name of folder you can give anything.
  • Now mount this folder to the new disk by mount /dev/xvdf1 /myfold command.Step 8: Verify Data Integrity in Ohio

Step 8: Verify Data Integrity in Ohio

  • Now go inside this folder by cd /myfold command and list the file by ls command here you can see the file which we have create in N.Virginia region.
  • Now see the data which we have stored by cat pappu.txt command, here you can see the exact same data.

By following this guide, you should be well-equipped to move EBS volumes between AWS regions securely while preserving their data. AWS provides powerful tools to manage data in the cloud, ensuring data mobility and resilience for businesses of all sizes.

If you found this blog helpful, we’d greatly appreciate your support! Please consider giving us a follow and clicking the 👏 button below to show your appreciation. 😄

Connect with me for more content

LinkedIn✨: https://www.linkedin.com/in/pappu2612/

keep learning keep sharing

Thank you for taking the time to read…….

--

--

Pappu Sanodiya
Pappu Sanodiya

Written by Pappu Sanodiya

Technical Content Writer | DevOps and Cloud Aspired | Exploring Cutting Edge technology | Passionate about making complex tech concepts simple and accessible |

No responses yet