I am trying to image a disk for one of our network appliances and am running into an issue with saving the output file.
This is the command:
ssh [email protected] shell "dd if=/dev/md0 |gzip -1 -" dd of=md0_monSecondary.gz"
The screen outputs a bunch of garbled text and at the end says the following:
Lgzip: can't stat: dd: No such file or directory
gzip: can't stat: of=md0_blah.gz: No such file or directory
The other command we were given is this:
ssh [email protected] shell "dd if=/dev/md0 bs=10M | tail -c +7 | head -c -6 > md0.img"
If I run that I get a Error:
No such command
If I run it without quotes
ssh [email protected] shell dd if=/dev/md0 bs=10M | tail -c +7 | head -c -6 > md0.img
I get a message that says:
'tail' is not recognized as an internal or external command, operable program or batch file.
What am I doing wrong with these commands?