Export/Import Custom Image, Copying backup of block volumes between the regions in OCI !!

Hi Guys,

In today’s post will see below things.

Agenda:

How to move resources like custom images, block volumes of one region to other.

Regions subscribed are FRANKFURT and ASHBURN.

My environment:

I already created an instance INST01_FRANKFURT with attached block volume BV01_FRANKFURT in compartment comp01_FRANKFURT in FRANKFURT region.

Aim:

Now want to take image of instance INST01_FRANKFURT and create the instance in ASHBURN region, copy the backup of block volume BV01_FRANKFURT to ASHBURN region and create the block volume from backup and attach to the instance in ASHUBRN region.

Documents followed:

Custom images export and import to other regions:

https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm

Copying Backup Block volumes across the regions:

https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/copyingvolumebackupcrossregion.htm

Steps:

In FRANKFURT region:

  1. Create a compartment called comp01_FRANKFURT.
  2. Create a VCN comp01_FRANKFURT_vcn01 with CIDR 10.0.0.0/16.
  3. Create SUBNET A (10.0.1.0/24), SUNBET B (10.0.2.0/24), SUBNET C (10.0.3.0/24)
  4. Create Internet Gateway comp01_FRANKFURT_IGW01.
  5. Create instance INST01_FRANKFURT using the VCN comp01_FRANKFURT_vcn01.
  6. Create a block volume BV01_FRANKFURT and attach to instance INST01_FRANKFURT
  7. Create the custom image of INST01_FRANKFURT.
  8. Create a bucket in object storage.
  9. Export the image of instance to bucket in object storage.
  10. Create pre-authentication URL for the object exported in object storage.
  11. Create a backup of the block volume.
  12. Copy the backup of the block volume to ASHBURN region using the same compartment.

In ASHBURN region:

  1. Create a compartment called comp02_ASHBURN.
  2. Create a VCN comp02_ASHBURN_VCN01 with CIDR 172.0.0.0/16.
  3. Create SUBNET A (172.0.1.0/24), SUBNET B (172.0.2.0/24), SUBNET C (172.0.3.0/24)
  4. Import the custom image of FRANKFURT region using pre-authentication URL created.
  5. Create the instance INST02_ASHBURN using the imported custom image.
  6. Create a block volume from the backup in the compartment comp02_ASHBURN.
  7. Attach the same block volume to the instance.
  8. Rename the logical volumes and volume group names and mount the same in the instance.

Created instance INST01_FRANKFURT with block volume BV01_FRANKFURT attached in FRANKFURT region.

Stop the instance and take the custom image backup.

Create the bucket in object storage and export the image backup to bucket.

Exporting Image to bucket.

Creating Pre-authenticated URL for the image object in the bucket.

Copy the URL and keep it in the notepad, we have to use this URL when importing image from other region.

Now going to ASHBURN region custom images and import the image through the pre-authenticated URL.

Importing the image.

After successful image import, create the instance using the imported image.

Provisioning the instance:

Instance created successfully using the imported image in ASHBURN region.

Connect to the instance created.

Take the backup of block volume in FRANKFURT region and copy the backup to ASHBURN region.

Once the backup of block volume copied, create the block volume from backup in the comp02_ashburn compartment and attach to the instance.

After successful attachment of block volume to the instance, execute the iscsi commands and mount the same.

When the instantiation of iscsi done, automatically it will mount with previous mount point. So, change the names of LV’s, VG’s and mount to new directory.

Hope this post find’s you well !!

Happy learning !!

Firoz Hussain K.

Comments
  1. Posted by Chandra Kishore

Add Your Comment