Re: Going deeper on merge feature
"vash-dar.ztzvp--- via Dar-support" <[email protected]> Wed, 20 Dec 2023 16:50:37 +0000
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <[email protected]> |
On Sunday, December 17th, 2023 at 02:49, Denis Corbin - dar.linux at free.fr <dar_linux_at_free_fr_bkyxcbq-Xswo3RjJnUcnd4MvtDKV2g@public.gmane.org> wrote: Hello Denis, thank you for replying so fast and accurately. Sorry for my late reply, I took some time to study the docs comparing it with what you had explained. > first I understand that 2021_diff-backup is a differential backup > (according the name and the fact it contains 'deleted' > files, as you mentioned). > > My question is: what was the backup of reference for 2021_diff? Was it > 2020_full-backup or another backup? > > Let's assuming the reference backup was 2020_full-backup and consider > this command-line: > > dar -+ merged -A 2020_full -@ 2021_diff -/Oo > You understood correctly. 2020_full was the backup reference of 2021_diff. Sorry for not being clear enough by my side. [...] > what you are not taking into account here, is: > 1/ that an entry that has not changed since the backup of reference is > stored as en empty shell in the diff backup: there is only the metadata. > This get the flag "unsaved". > > 2/ When a file has been removed between the full and the diff backup, > the diff contains a special entry telling that the file has been > removed. (to be able to remove the file from filesystem when restoring > the differential backup). > > For those two previous case, the overwriting policy keep in the > resulting archive the "Unsaved" version of files and the "deleted" > entries. Both cannot be used to restore anything from them. > Thank you to have explained it clearly. Actually, that was the status I observed during my tests. I still wonder why "-/ Oo" doesn't seem to be the default overwrite policy as it is reported by the documentation. [...] > Now, if you plan is to make a full backup from the diff backup as if a > full backup was done at the time of the diff backup, this is as easy as > adding "full-from-diff" in your merge pattern. That's exactly what I meant and want to do. > > I let you first examin the /etc/darrc provided with dar, where the > "full-from-diff" definition contains the adhoc overwriting policy and a > quick documentation on how to use it. > Thanks a lot for this precious hint. I applied that policy and actually reached my goal. Docs mentions that logical operators must be escaped if they will be typed in a CLI. I realized that only after having done the merge, then I didn't used any of them. Anyway, It seems to be I reached my goal. I'll be more careful next time. I didn't know how to treat the "Saved status" but now, I understood that's possible through the "conditions mechanism". That's not really easy to understand to me, but I feel I understood the most of it. I'll do some more test on it just for learning purpose. > Cheers, > Denis Thanks a lot. -- vash