I'm looking for a good and easy way to clone a partition. Surprisingly, I haven't managed to find any suitable solutions, despite this being a seemingly easy and common task. Some general requirements, to make this question distinct from a dozen of other, similar use cases:
- I want to clone a partition, not a whole disk.
- It must be copied directly from disk to disk. Writing an image file and then restoring it is wasteful.
- There is enough free space on the target drive. No shrinking or enlarging is involved.
- "Cloning" a partition is more than just the content. A new partition must be created on the target drive, with the same name/label and flags. All the required information is already included in the task "Copy this partition to this drive", I do not want to manually specify disk offsets etc.
- It must be file system agnostic, and also work with encrypted partitions.
Here are some solutions that I tried:
- dd would usually be the go-to tool for cloning tasks, but I don't think it can create new partitions.
- Clonezilla can copy partitions and it will even handle the partitioning, but it requires me to select (and thus overwrite) and existing partition which is kind of annyoing.
- GParted has a Copy/Paste mechanism, but the buttons are greyed out most of the time for some reasons.