Backing up another PC with a single Ethernet cable
I was in a pinch.
I needed to make a full disk backup of a PC, but I had no external storage device with me to store it on. The local Wi-Fi network was also way too slow to transfer the disk over it.
All I had was my laptop with an Ethernet port, a Fedora Linux USB stick, and a short Ethernet cable.
I took the following steps:
- boot the target machine up with the Fedora Linux installer in a live environment
- modify the SSH configuration on the target machine to allow
root
user login with a password- it’s OK to do this on a temporary setup like this one, but don’t do it on an actual Linux server
- set a password for the
root
user on the target machine- only required because a live environment usually does not set one for
root
user
- only required because a live environment usually does not set one for
- connect both laptops with the Ethernet cable
- set static IPv4 addresses on both machines using network settings 1
- edit the “Wired” connection and open the IPv4 tab
- example IP address on target: 192.168.100.5
- example IP address on my laptop: 192.168.100.1
- make sure to set the netmask to 255.255.255.0 on both!
- verify that the SSH connection works to the target machine
- back up the disk to your local machine using
ssh
anddd
- example:
ssh root@192.168.100.5 "dd if=/dev/sda" | dd of=disk-image-backup.iso status=progress
- replace
/dev/sda
with the correct drive name!
- example:
And just like that, I backed up the 120 GB SSD at gigabit speeds to my laptop.
I’ve used a similar approach in the past when switching between laptops by running a live environment on both machines
and copying the disk over with dd
bit by bit.
You’ll also save time on not having to copy the data over twice, first to an external storage device, and then to the target device.
-
there’s probably a simpler way to do this with IPv6 magic, but I have not tested it yet ↩︎
Subscribe to new posts via the RSS feed.
Not sure what RSS is, or how to get started? Check this guide!
You can reach me via e-mail or LinkedIn.
If you liked this post, consider sharing it!