Skip to content

Instantly share code, notes, and snippets.

@stefanlasiewski
Last active January 26, 2020 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanlasiewski/d64bbc4a7a81079b4958b7f87472ea2e to your computer and use it in GitHub Desktop.
Save stefanlasiewski/d64bbc4a7a81079b4958b7f87472ea2e to your computer and use it in GitHub Desktop.
Using DD & PV for disk cloning with progress
# Coreutils 8.24+ ships with dd with the status=progress option
root@host:~# dd if=/dev/sdb conv=sync,noerror status=progress | lz4 > disk.img.lz4
1430323712 bytes (1.4 GB, 1.3 GiB) copied, 41 s, 34.9 MB/s
# pv (Pipeview) can also show a nice progress bar
root@host:~# dd if=/dev/sdb conv=sync,noerror | pv -tpreb | lz4 > ~stefanl/touch.img.lz4
472MiB 0:00:14 [36.0MiB/s] [ <=> ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment