Skip to content

Instantly share code, notes, and snippets.

@rubenerd
Created December 22, 2017 05:27
Show Gist options
  • Save rubenerd/6e42d4db70cbd524b7bd52f3a81793ae to your computer and use it in GitHub Desktop.
Save rubenerd/6e42d4db70cbd524b7bd52f3a81793ae to your computer and use it in GitHub Desktop.
Local to remote compressed gzip (dcfl)dd
#!/bin/sh
## I used to always pipe (dcfl)dd to gzip over ssh
## Why not just use ssh's compression that uses gzip anyway?
_SOURCE="/dev/xvdb"
_DEST="/dev/xvdb"
_HOST="hostname"
ssh -C "$_HOST" dcfldd if="$_SOURCE" | dcfldd of="$_DEST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment