You can copy a Linode's disk image from one Linode account to another. This is a great way to prepare a disk image for another Linode customer and transfer it from your account to the other user's account. Or if you have multiple Linode accounts, you can use this guide to consolidate all of your disk images in one account.
Before initiating the transfer, you'll need to prepare the source Linode that contains the disk image you want to copy. Start the Linode in rescue mode to transfer files to the other account. Here's how:
Your Linode is now ready to transfer files to the other account.
You'll also need to prepare the receiving Linode before initiating the transfer. First, create a new disk image to hold the files from the other Linode. Then start the Linode in rescue mode to receive the files from the other account.
To hold the files that will be transferred from the other Linode, you should create a new disk image. Here's how:
You have successfully created a disk image to hold the files from the other account's disk image.
Start the receiving Linode in rescue mode. Here's how:
Your Linode is now ready to receive the files from the other Linode account.
Now it's time to start copying the files on the disk image from one account to another. Here's how to initiate the file transfer:
On the source Linode, enter the following command to start copying the disk image, replacing 18.104.22.168 with your Linode's IP address.:
dd if=/dev/xvda | ssh -C 22.214.171.124 "dd of=/dev/xvda"
The following output appears. Enter yes to continue connecting:
The authenticity of host '126.96.36.199 (188.8.131.52)' can't be established. RSA key fingerprint is 20:f4:de:4d:5c:6e:a9:c7:e6:1f:8a:ad:60:62:96:3f. Are you sure you want to continue connecting (yes/no)?
You will be prompted for the root password. Enter the password you created in the last section when you started the SSH server:
The file transfer will start, as shown below:
2048000+0 records in 2048000+0 records out 1048576000 bytes (1.0 GB) copied, 391.504 seconds, 2.7 MB/s 2048000+0 records in 2048000+0 records out 1048576000 bytes (1.0 GB) copied, 387.843 seconds, 2.7 MB/s
Wait for the transfer to complete. Note that this process can take a while, depending on the size of your disk image.
After the file transfer has completed, you should verify the disk image by mounting it on the receiving Linode. Here's how:
Make a new directory for the disk image by entering the following command:
Mount the disk image by entering the following command:
mount /dev/xvda linode
View the directories in the disk image by entering the following command:
The output should appear similar to what's shown below:
bin dev home lost+found mnt proc sbin srv tmp var boot etc lib media opt root selinux sys usr
Now that you've ready to boot from the disk image.
Now it's time to boot from the disk image. First, you'll create a configuration profile on the receiving Linode, and then you'll boot the receiving Linode with the disk image you just transferred.
The boot the receiving Linode from the transferred disk image, you'll need to create a new configuration profile. Here's how:
You have successfully created the configuration profile.
Now to start the receiving Linode from the transferred disk image, you'll need to select the configuration profile you just created. Here's how:
Your Linode will boot using the disk image you transferred.
This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
Last edited by Matthew Cone on Monday, February 4th, 2013 (r3309).