On Mon, Nov 23, 2020 at 9:18 AM Chris Murphy <lists@colorremedies.com> wrote:
I agree with the suggestions to use a tool appropriate for this task,
and that dd isn't likely what you want. I like dd/ddrescue for the
specific case of data recovery. But for data replication, it's better
to use something that's intended for that purpose.


Well again, is partclone truly the best option if I am not cloning a partition ?

I am cloning a logical volume and not a partition. Will partclone help ?
 
Btrfs, it's either the seed/sprout feature. Or you can get finer
granularity with send/receive. Seed/sprout replication results in the
volume UUID's being unique, and duplicates at the Btrfs block group
level (a group of extents). It's quite fast, and skips over
unused/unallocated areas. send/receive is a bit different, there is a
stream format that isn't an exact copy of the on-disk representation
but it will copy all files and their metadata including permissions,
owner, date/time stamps and xattr. Both work on mounted file systems.

xfs has xfs_copy

ext4 I think it has some kind of dump facility but the man page for
dumpe2fs doesn't look like it does that. So I'm not sure.


I don't use btrfs or xfs, and I have never heard of dumpe2fs, but I will look into it.

Again, just cloning a logical volume and not a full partition.
 
And of course file copy tools are OK as well, though they sometimes
come with the burden/risk of many extra options.



I really don't want to use the copy options for something like cloning.
 

--
Regards,
Sreyan Chakravarty