LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using dd to copy an image file to a remote system (http://www.linuxquestions.org/questions/linux-software-2/using-dd-to-copy-an-image-file-to-a-remote-system-800595/)

kaplan71 04-07-2010 10:31 AM

Using dd to copy an image file to a remote system
 
Hi there --

I am trying to get the dd command to successfully copy a disk image to a remote system. Right now I am testing out the syntax by trying to copy the /dev/sda1 directory of the subject computer. The command syntax that I am using is the following:

Code:

dd if=/dev/sda1 ibs=4096 conv=notrunc,noerror | (ssh 132.183.12.128 of=/roarchive/test obs=4096)
The user account running this command is root, and the account does have key-based authentication between the source and destination computers.

The command does not return any error messages, but when I check the directory on the destination system, the expected output is not there.

What step(s) do I need to correct this? Thanks.

rn_ 04-07-2010 10:36 AM

You're missing the dd after the ssh. Is that just a typo?

roreilly 04-07-2010 10:36 AM

This may help you:

http://alma.ch/blogs/bahut/2005/02/w...loning-os.html

mreschke 04-07-2010 10:37 AM

I am not sure about the syntax, but another option would be to use sshfs to mount the remote filesystem to a local directory, then use standard dd syntax of 'if' and 'of'

kaplan71 04-07-2010 10:45 AM

Hi there --

The missing dd after the ssh is not a typo, I didn't know it was supposed to be there. Once I added it in, the problem appeared to have been solved. Thanks.

mreschke 04-07-2010 10:46 AM

ok, please post the command you used, for our records thanks.

kaplan71 04-07-2010 10:48 AM

Sure thing --


Code:

dd if=/dev/sda1 ibs=4096 conv=notrunc,noerror | (ssh 132.183.12.128 dd of=/roarchive/test/roarchivetest.img obs=4096)

custangro 04-07-2010 10:50 AM

Quote:

Originally Posted by mreschke (Post 3927526)
ok, please post the command you used, for our records thanks.

Also mark the tread as solved :)


All times are GMT -5. The time now is 03:39 PM.