partclone
linux
Copy and restore partitions to and from an image while disregarding empty blocks.
More info →Options (4)
-c, --clonebooleanCopy a partition into an image
Example:
sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}-s, --sourcebooleanCopy a partition into an image
Example:
sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}-o, --outputbooleanCopy a partition into an image
Example:
sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}-h, --helpbooleanDisplay help
Example:
partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-h|--help]}}Examples (3)
Copy a partition into an image
sudo partclone.ext4|btrfs|fat32|xfs|... [-c|--clone] [-s|--source] /dev/sdXY [-o|--output] path/to/backup.imgRestore a partition from an image
sudo partclone.ext4|btrfs|fat32|xfs|... [-c|--clone] [-s|--source] path/to/backup.img [-o|--output] /dev/sdXYDisplay help
partclone.ext4|btrfs|fat32|xfs|... [-h|--help]made by @shridhargupta | data from tldr-pages