Can I transfer files between two Linode's using a Block Storage Volume?

Linode Staff

I would like to transfer the data on my Block Storage Volume to another Linode. Can this be done?

1 Reply

Introduction

Block Storage is a great way to transfer files between two of your Linode's in the same data center. If you already have a Block Storage Volume up and running and wish to transfer it to another Linode, feel free to skip past this first part.

Add a Block Storage Volume.

The first thing you will need to do is add a BS Volume to your Linode account and attach it to the Linode containing the files you would like to transfer. During this process you will define the size of the volume, create a filesystem on it, and assign a mount in your Linode’s /etc/fstab file so you create directories and transfer your content over. We already have an extensive guide covering Block Storage so I’ve included links below, highlighting the particular sections you’ll need.

Add a Block Storage Volume to a Linode
Attach a Volume to Your Linode

Move a Block Storage Volume to another Linode

When you’re ready to transfer your Volume to a new Linode you will first need to detach it from the Linode it is currently assigned to. To ensure the integrity of your data we recommend powering down your Linode before detaching any Volumes. However, this is not required so you are free to proceed at your own risk. The link below will guide you through detaching your Volume.

Detach a Block Storage Volume

Navigate back to the Volumes section of your Linode Manager and attach your Volume to the Linode you want to receive the data. Once again the link below will take you though this step, just be sure to skip past where you create a file system since one is already in place. Once the volume is attached, create a mount point for it on the new Linode and mount the volume.

Attach a Volume to Your Linode

mkdir /mnt/$NAME_OF_VOLUME

mount FILE_SYSTEM_PATH /mnt/$NAME_OF_VOLUME

Once this is complete you should be able to run df -h and see your Volume listed. You can view the contents of the Volume by running ls /mnt/$NAME_OF_VOLUME

At this point you should be able to move data between the Volume and your Linode using the cp and mv commands. I've included links to the man pages for these commands below.

http://man7.org/linux/man-pages/man1/cp.1.html
http://man7.org/linux/man-pages/man1/mv.1p.html

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