Personal tools
You are here: Home Unix Network and Scripts dd through the network
Document Actions

dd through the network

by admin last modified 2010-03-15 20:55

how to pipe the dd output a ssh or rsh connection

Sometimes you have to transport some partition at one maschine, but need them at a other maschine. nehmen wir an der Rechner clone soll die selben Partitionsdaten erhalten
Auf dem Zeilrechner:
nc -l -p 10000 | pv | dd of=/dev/sdb

Dann auf dem anderen Rechner:
dd if=/dev/sda | pv | nc clone 10000
oder allgemeiner für IRIX
dd if=/dev/sda | ssh -c blowfish clone  dd of=/dev/sdb bs=4048
alternativ auch mit rsync
rsync --progress -pe ssh /dev/sda clone:/dev/sdb
Es gibt weitere Varianten:
dd if=/dev/sda | ssh root@zielpc "dd of=/dev/sdb"
dd if=/dev/sda | ssh clone dd of=/dev/sdb
And now, logged in at the target (e.g. booted from a Knoppix CD) getting harddisk data from an remote machine
ssh root@source "dd bs=4048 if=/dev/hda" | dd bs=4048 of=/dev/hda
Or if you have to copy device files
ssh root@source "find / -print | cpio -o -Hnewc" | cpio -idvum --no-absolute-pathnames

To copy a file or directory between hosts in seperated network segments via a computer that can reach both

 ssh root@source "cd /path/to/file/ ; tar cvf - [1-9]*" | ssh root@target "cd /path/to/file/ ; tar xf -"

Um eine SCSI Platte in einer SGI (IRIX) auf einen Linux-Rechner zu kopieren wäre folgendes Kommando passend (es ist immer das vol Device):
dd if=/dev/rdsk/dks0d1vol  bs=4048 | ssh cactus dd of=/dev/sdb bs=4048

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: