Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/platform/disk-images/copying-a-disk-image-over-ssh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ description: "Create a disk image using dd and download it to another machine ov
keywords: ["copy", "disk", "ssh", "dd"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
aliases: ['migration/ssh-copy/','migrate-to-linode/disk-images/copying-a-disk-image-over-ssh/','platform/disk-images/copying-a-disk-image-over-ssh/']
modified: 2019-01-14
modified_by:
name: Linode
published: 2012-06-04
Expand All @@ -19,13 +18,17 @@ Piping SSH commands to utilities such as `dd`, `gzip`, or `rsync` is an easy way

This guide demonstrates how to download a `.img` file to your computer over SSH containing a block-level copy of your Linode's disk device created with `dd`.

{{< note >}}
If the amount of data on your disk is much less than the size of the disk, then downloading a copy with `dd` can take longer than just downloading your files. If you're interested in downloading individual files or directories, review the options listed in our [Download Files from Your Linode](/docs/security/data-portability/download-files-from-your-linode/) and [Backing Up Your Data](/docs/security/backups/backing-up-your-data/) guides.
{{< /note >}}

## Download a Disk over SSH

### Boot into Rescue Mode

1. Prepare the receiving computer by verifying that SSH is installed. Most Linux/Unix-like systems include OpenSSH in their package base by default. If the receiving system is Microsoft Windows, there are multiple SSH solutions available such as [Cygwin and PuTTY](/docs/networking/ssh/using-ssh-on-windows).

1. Reboot Your Linode into [rescue mode](/docs/troubleshooting/rescue-and-rebuild/#booting-into-rescue-mode) and connect to it using [Lish](/docs/platform/manager/remote-access/#console-access).
1. Reboot Your Linode into [Rescue Mode](/docs/troubleshooting/rescue-and-rebuild/#booting-into-rescue-mode) and connect to it using [Lish](/docs/platform/manager/remote-access/#console-access).

1. Set a root password for the rescue system and start the SSH server:

Expand Down Expand Up @@ -100,7 +103,7 @@ You may want to upload your disk image to a new server. For example, if you prev

1. Now use the remaining disk space to create the system drive you'll copy your disk image to. Enter a descriptive name in the **Label** field, and be sure the **Size** is large enough to hold the contents of the disk you are uploading. Click **Save Changes**.

1. Reboot Your Linode into [rescue mode](#boot-into-rescue-mode) and start the SSH server as described above.
1. Reboot Your Linode into [Rescue Mode](#boot-into-rescue-mode) and start the SSH server as described above.

1. Upload the disk over SSH to the Linode. Replace `192.0.2.9` with the Linode's IP address and `/home/archive/linode.img` with the disk images's path.

Expand Down Expand Up @@ -137,7 +140,7 @@ You can check if this is necessary by comparing the space of the filesystem to t

In the above example, the values in the **Size** column don't match. Although the disk is 30 GB, the filesystem can only see 24 GB.

To use all available space on the new disk, execute the following from rescue mode. Replace `/dev/sdx` with your system disk's device identifier (/dev/sda, /dev/sdb, etc.).
To use all available space on the new disk, execute the following from Rescue Mode. Replace `/dev/sdx` with your system disk's device identifier (/dev/sda, /dev/sdb, etc.).

e2fsck -f /dev/sdx
resize2fs /dev/sdx
Expand Down