Sample Header Ad - 728x90

Reflink copy diff

0 votes
1 answer
292 views
I want to make a behaviour like btrfs send and btrfs receive, but on a per-file basis. As far as I see it, I can use cp -ax --reflink=always to make a "snapshot" of the file. Let's assume that two such "snapshots" on two different hard disks are exactly equal. How do I cp the diff (and only the diff) between two reflinked files like btrfs send -p would do it? Ideally, I would like to have a solution that works on any filesystem that is capable of making reflinks and not only on btrfs. Also ideally, I would like to run it without sudo. I know that I can look at the file extents with filefrag, but filefrag does not guarantee that the results are exact. I would rather copy some megabytes more than taking the risk of a corrupted file.
Asked by user1994405 (1 rep)
Apr 29, 2020, 02:58 PM
Last activity: Apr 29, 2020, 06:41 PM