Migrate data from CentOS to AlmaLinux on Lightsail - Amazon Lightsail

Migrate data from CentOS to AlmaLinux on Lightsail

Migrating from CentOS to AlmaLinux is a straightforward process by which you move data from one instance in Lightsail to another. This topic outlines two options that you can use to migrate your data.

For more information see the AlmaLinux documentation on the AlmaLinux Wiki site.

Prerequisites

(Optional) Use secure copy (scp) to transfer files between instances

You can securely transfer files from your CentOS instance to the new AlmaLinux instance by using the secure copy command in Linux. For more information, see Transfer files between Linux instances on Lightsail using scp.

(Optional) Move the block storage disk from the CentOS instance to the AlmaLinux instance

Use the following procedure to move a secondary block storage disk from your CentOS instance bundle to the AlmaLinux bundle. You cannot detach the instance's boot volume disk; the disk that contains the operating system. After you attach the disk to your AlmaLinux instance, you need to connect to that instance and mount the disk. For more information, see Expand storage and performance with Lightsail block storage disks.

If your CentOS instance is running, you will need to stop it before you can detach the disk. For more information, see Stop a running instance.

  1. From the Storage section of the Lightsail console, select the disk that you want to detach from your CentOS instance.

    The storage section in the Lightsail console.
  2. On the Details tab, choose Detach.

    The disk details in the Lightsail console.
  3. From the disk Details page, choose the Attach to an instance dropdown menu. Then choose the name of your AlmaLinux instance.

    The attach disk dropdown menu in the Lightsail console.
  4. Choose Attach.

  5. (Optional) You might need to connect to your AlmaLinux instance and mount the disk before you can access its data. For more information, see Connect to your instance to format and mount the disk.

Warning

The above link provides instructions for how to mount and format the attached disk. Do not format the disk that you attached to your AlmaLinux instance. Formatting it will permanently erase all information stored on the disk.