LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 09:31 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

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, 09: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, 09: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, 09:37 AM   #4
mreschke
LQ Newbie
 
Registered: Mar 2010
Distribution: Arch, Ubuntu, LFS
Posts: 18

Rep: Reputation: 5
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 09:44 AM.
 
Old 04-07-2010, 09:45 AM   #5
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

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, 09:46 AM   #6
mreschke
LQ Newbie
 
Registered: Mar 2010
Distribution: Arch, Ubuntu, LFS
Posts: 18

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

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, 09:50 AM   #8
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
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



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 09:57 PM
How to backup image (file system) to remote Host. grens Linux - Enterprise 0 11-16-2007 01:54 PM
how to use ftp in linux to copy files from remote system. helpdeskmtv General 2 10-29-2007 10: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 03:11 PM
DD Image File Copy To HDD klownska Linux - Software 2 04-12-2004 07:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:29 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
Open Source Consulting | Domain Registration