Edrusb / DAR

DAR - Disk ARchive
http://dar.linux.free.fr/
GNU General Public License v2.0
133 stars 19 forks source link

Apply delta patch when merging #56

Open AndrolGenhald opened 10 months ago

AndrolGenhald commented 10 months ago

I'm trying to merge a full backup with a later differential backup to create a new full backup with the same data as the differential, based on this mail thread here. The issue I'm running into is that I have backups with delta signatures, and with the overwriting policy {!(~I)}[Rr] {~S}[O*] P* ; {~s}[*o] *p what appears to happen is that for files that had a delta change recorded, it takes the data that was saved for the delta and stores that in the merged archive. Then when I try to restore from it, it doesn't work for those files because it only has the delta patch, and not the full contents of the file. What I would like to happen is for the merge operation to take the data from the original archive, apply the delta patch, and store that result in the merged archive, but as far as I can tell that would require a new overwriting policy option (and I'm quite sure that also wouldn't work with the -ak flag since it would require decompressing to apply the patch).

Edrusb commented 9 months ago

The email thread you refer to is dated from 2013 (ten years ago) and this trick/hack has been integrated in dar as part of /etc/darrc under the user target "full-from-diff". See FAQ for details. Binary delta is only available since release 2.6.0 (December 2018) and this this discussion and FAQ does not apply here.

The merging operation only does what you mentioned: merging two backups with an overwriting policy to resolve conflicts and decide which version to retain when a file is present in both backups. Thus, this is not an overwriting policy nor a merging operation that can perform what you plan to do when binary delta are concerned, but a brand-new feature...