How to Copy and Create a Linode image to be copied another Environment.

I have a Linode and I have backup enabled and I would like to copy the backup to another environment, not on Linode. Whatis the best way to do this and what are the steps involved.

I will not move the image to another hosted environment. I will move it to my University network.

4 Replies

The steps involve will depend on your Linode's Distribution and for environment to which you might want to transfer your Linode, the general process involves:

1) Deploy your Backup to a New Temporary Linode.

There is no way to directly download your backups, so you must create a Linode from the backup first.

2) Getting a copy of your Linode's Disk Image

If your receiving machine is available via SSH over the Internet, you can use this method:

If your receiving machine cannot be reached by SSH from your Linode, you can create another temporary Linode with enough disk space to contain an image file of the Linode and then use a program like WinSCP, FileZilla or Cyberduck to download the image file.

3) Adjusting the configuration files in your Linode's disk to refer to the paths or device names provided by the new environment.

Typically a Linode's disk is referred to by the device /dev/sda. It does not contain a partition table or boot record.

In other environments, like a Linux installation on PC hardware, /dev/sda could refer to a raw disk device which has a boot record and is partitioned, the partitions could be referred to as /dev/sda1, etc. Mapping around these differences can be tricky and what needs to be done will vary depending on the environment to which you are attempting to boot the image.

To edit these paths, you would typically use a rescue CD or distribution such as FINNIX to mount the image and make the necessary changes to the distribution specific configuration files which refer to your device paths, such as your GRUB configuration and /etc/fstab for example.

Depending on your environment, you may also need to adjust the networking configuration as well.

You wrote this Harry:

If your receiving machine cannot be reached by SSH from your Linode, you can create another temporary Linode with enough disk space to contain an image file of the Linode and then use a program like WinSCP, FileZilla or Cyberduck to download the image file.

A great ideal except you do not provide any instructions on how to accomplish this task.

Just as an FYI, the receiving environment is Windows 10

I'm thankful to know where more clarification is needed. To be clear, I have not done this myself, hence the lack of detailed instructions, but I have reason to believe the method is sound because I have performed each of the steps required to get from point A to point B independently of this problem.

Problem 1: We need to get an image of your Linode's disk. As we cannot easily store a copy of the Linode's disk onto itself, we will need another place to store the image. A second temporary larger Linode seems the most convenient place to store the image.

Problem 2: If you are on a Windows machine behind an ISP router, your Windows machine does not have an IP address to which your Linode can ssh into it directly. You can therefore only use it to download an image served from the internet as we cannot easily configure it to allow your Linode to connect to it from the outside and put the image on your Windows machine.

To illustrate the necessary steps:

Assuming you have a 1GB "source" Linode with 25GB disk, you would deploy a temporary 2GB "intermediary" Linode (with 50GB of storage). You would then follow the instructions here:

to copy an image of your source Linode to an image file on the intermediary Linode. You can use whatever file names you want, but remember where you put things. The guide above uses /home/archive/linode.img as an example however /home/archive will not exist by default, so I might suggest using /root/linode.img as a more convenient alternative.

Note: At the time of this writing the above guide will not work as is because of an issue with the configuration file for ssh in rescue mode. The work around for this to allow root access for SSH in rescue mode is to issue the following commands in step 3 where it says to set a root password for the rescue system and start the SSH server:

passwd
sed -i -e 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config
sed -i -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
service ssh start

Once you have created the image file on your intermediary Linode, you would then use a program such as WinSCP:

to download the file from your intermediary Linode to your Windows machine.

First I would like to thank you very much for your support. It's the main reason why I continue to be a customer at Linode, the support is world-class.

Find below my Linode environment.

⦁ My current Lindode environment:

DATAVERSE-4.20-V1
CentOS 7, Linode 8GB: 4 CPU, 160GB Storage, 8GB RAM

DATAVERSE-4.20-V2
CentOS 7, Linode 8GB: 4 CPU, 160GB Storage, 8GB RAM

DATAVERSE-4.20-V3
CentOS 7, Linode 8GB: 4 CPU, 160GB Storage, 8GB RAM

⦁ Task
I need to make an exact copy (clone) of Linode (DATAVERSE-4.20-V1) and copy that Linode.img to an external hard drive with is connected to a Windows 10 Laptop.

Steps completed

  1. I have created Linode DATAVERSE-4.20-V3 using a backup of DATAVERSE-4.20-V1

After I have completed the above step,

what steps should I follow next?

Can you give the steps in sequential order because the steps you provided send me from link to link and I am not able to follow you thinking and the flow of steps?

Note: At the time of this writing the above guide will not work as is because of an issue with the configuration file for ssh in rescue mode.

This is the third time I am requesting help on this matter and I have to say I have lost roughly a week of productivity.

I sincerely hope that the question can be answered and please assume that the response you provide is to a person with very limited knowledge with Linux.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct