LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 04-07-2010, 10:31 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 719

Rep: Reputation: 39
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.
 
Old 04-07-2010, 10:36 AM   #2
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
You're missing the dd after the ssh. Is that just a typo?
 
Old 04-07-2010, 10:36 AM   #3
roreilly
Member
 
Registered: Aug 2006
Location: Canada
Distribution: Debian, Slackware
Posts: 106

Rep: Reputation: 28
This may help you:

http://alma.ch/blogs/bahut/2005/02/w...loning-os.html
 
1 members found this post helpful.
Old 04-07-2010, 10:37 AM   #4
mreschke
LQ Newbie
 
Registered: Mar 2010
Distribution: Arch, Ubuntu, LFS
Posts: 18

Rep: Reputation: 4
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'

Last edited by mreschke; 04-07-2010 at 10:44 AM.
 
Old 04-07-2010, 10:45 AM   #5
kaplan71
Member
 
Registered: Nov 2003
Posts: 719

Original Poster
Rep: Reputation: 39
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.
 
Old 04-07-2010, 10:46 AM   #6
mreschke
LQ Newbie
 
Registered: Mar 2010
Distribution: Arch, Ubuntu, LFS
Posts: 18

Rep: Reputation: 4
ok, please post the command you used, for our records thanks.
 
Old 04-07-2010, 10:48 AM   #7
kaplan71
Member
 
Registered: Nov 2003
Posts: 719

Original Poster
Rep: Reputation: 39
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)
 
Old 04-07-2010, 10:50 AM   #8
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by mreschke View Post
ok, please post the command you used, for our records thanks.
Also mark the tread as solved
 
  


Reply

Tags
dd, netcat, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Image of System to larger drive villumanati Fedora 3 03-16-2009 10:57 PM
How to backup image (file system) to remote Host. grens Linux - Enterprise 0 11-16-2007 02:54 PM
how to use ftp in linux to copy files from remote system. helpdeskmtv General 2 10-29-2007 11:26 AM
LXer: Copy hard disk or partition image to another system using a network and netcat LXer Syndicated Linux News 0 08-12-2007 04:11 PM
DD Image File Copy To HDD klownska Linux - Software 2 04-12-2004 08:06 PM


All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration