Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to backup a disk from a remote system, but the remote system itself has not enough space available. Now I want to use ddand pipe the output through ssh, but I can't figure out how to do it. I read several sources on the web, but I'm stuck now.

Can someone please point me to a good resource or write down the command line with explanations?

share|improve this question

Ok, I figured it out:

ssh target_address dd if=remotefile | dd of=localfile

If you fill out the placeholders, you get something like this:

ssh -C username@192.168.1.123 "dd if=/dev/sda" | dd of=mydiskimage.img
share|improve this answer
    
there is a missing dd in the second command – Tshepang Nov 5 '14 at 11:44
    
@Tshepang Can you give the complete command with the dd that is missing? – cringe Nov 6 '14 at 10:43
1  
ssh -C username@192.168.1.123 dd if=/dev/sda | dd of=mydiskimage.img – Tshepang Nov 6 '14 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .