Skip to content

Instantly share code, notes, and snippets.

@DasLampe
Last active December 12, 2015 06:09
Show Gist options
  • Save DasLampe/4727396 to your computer and use it in GitHub Desktop.
Save DasLampe/4727396 to your computer and use it in GitHub Desktop.
Copy whole remote HDD-Image to local computer. In some cases you need dump the whole image of an remote HDD, e.g. you migrate an server and would backup all data. The problem, you can't save the image on the server, because there is no space left. One option is copy the image to another server, but who has a server with enough space. Otherwiess …
ssh user@example.com 'dd if=/dev/sdX | gzip -c | gpg -r [userid] -e' | pv | cat > ~/image_sdaX.gz.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment