10.01.2021 16:21, Hugo Mills пишет: > On Sun, Jan 10, 2021 at 01:06:44PM +0000, Graham Cobb wrote: >> On 10/01/2021 07:41, cedric.dew...@eclipso.eu wrote: >>> I've tested some more. >>> >>> Repeatedly sending the difference between two consecutive snapshots creates >>> a structure on the target drive where all the snapshots share data. So 10 >>> snapshots of 10 files of 100MB takes up 1GB, as expected. >>> >>> Repeatedly sending the difference between the first snapshot and each next >>> snapshot creates a structure on the target drive where the snapshots are >>> independent, so they don't share any data. How can that be avoided? >> >> If you send a snapshot B with a parent A, any files not present in A >> will be created in the copy of B. The fact that you already happen to >> have a copy of the files somewhere else on the target is not known to >> either the sender or the receiver - how would it be? >> >> If you want the send process to take into account *other* snapshots that >> have previously been sent, you need to tell send to also use those >> snapshots as clone sources. That is what the -c option is for. > > And even then, it won't spot files that are identical but which > don't share extents. >
It won't with "btrfs send -p" as well. >> Alternatively, use a deduper on the destination after the receive has >> finished and let it work out what can be shared. > > This is a viable approach. > > Hugo. >