Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 at 11:44
    
@Tshepang Can you give the complete command with the dd that is missing? –  cringe Nov 6 at 10:43
1  
ssh -C username@192.168.1.123 dd if=/dev/sda | dd of=mydiskimage.img –  Tshepang Nov 6 at 11:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.