This page is copied from orphaned-docs on GitHub, where it is written and corrected; it is also on the documentation site. Changes made here are overwritten.
Package: partclone · Writes to disks: to the output; when restoring, to the target partition
Copies only the blocks a file system uses, so images are much smaller than
with dd. There is one program per file system: partclone.ext4,
partclone.ntfs, partclone.vfat, partclone.btrfs, partclone.exfat,
partclone.f2fs, … (there is no partclone.xfs in Void; use xfsdump or
fsarchiver for XFS)
sudo partclone.ext4 -c -s /dev/sdX1 -o /mnt/target/sdX1.img # save (clone) to an image
sudo partclone.ext4 -r -s /mnt/target/sdX1.img -o /dev/sdY1 # restore the image to a partition
sudo partclone.ntfs -b -s /dev/sdX1 -o /dev/sdY1 # partition to partition
-c: clone to partclone's image format; -r: restore from it;-b: device to device.-s: source; -o: output.partclone needs a readable file system. For a disk with bad sectors, use
ddrescue instead.
Writes: restoring (
-r,-b) overwrites the target partition.
Wiki: Orphaned - Recovery
Wiki: Orphaned - ddrescue
Wiki: Orphaned - fsarchiver
Wiki: Orphaned Docs