Re: converting decremental to full backup

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 01/06/2019 21:09, Matus UHLAR - fantomas wrote:
> Hello,

Hello,

> 
> I have created a decremental backup and a full one, from older
> time.
> 
> 
> Now I'd like to get rid of the full backup and convert the
> decremental to full one. - in fact the opposite what I did when I
> created the decremental backup.
> 
> I have tried:
> 
> dar -+  -A full -@ decremental -/ Oo # to try overwriting deta in
> full archive with data from decremental archive
> 
> I have tried replacing -A and -@, change -Oo to -Pp
> 
> but either I get incremental/decremental backup, or I get the full
> backup containing new files.
> 
> is it possible to create old full debug without extracting both
> backups?

yes it is:

assuming:
- - at time 1 you have created a full backup named full1
- - at time 2 you have created a second full backup named full2
- - then just after you created a decremental backup decr1 which will
replaces full1 (dar -+ decr1 -A full1 -@full2 -ad ...)
- - you then deleted full1 as you now have decr1

Your question is: how to recreate full1 using full2 and decr1, right?

Just use this:

dar -+ressurected_full1 -A full2 -@ decr1 full-from-diff

full-from-diff target is defined in /etc/darrc and should be fetched
by  by dar unless you add -N option.

- ---
full-from-diff:
- -/ '{!(~I)}[Rr] {~S}[O*] P* ; {~s}[*o] *p'
- ---

For the details, this overwriting is applied when a entry is found on
both archives and means:
- - "{!(~I)}" = if the entry in decr1 is not an inode, then "[Rr]" = do
not add any entry in the resulting archive: The entry in decr1 is a
"detruit" object that flag the file to be removed when restoring
decr1, this is a file that was added at time 2.
- - else "{~S}" = if the entry in decr1 is a fully saved one, "[O*]" =
take it in the resulting archive else "P*" = use the entry from full2:
file  has not changed between time 1 and 2, it is thus completely
saved in full2 as it is a full backup
- - for EA and FSA: "{~s}" = if the EA/FSA is fully saved in decr1 take
it in the resulting archive else take the on from full2 which is
always fully saved (full backup).

last in case there is no conflict the overwriting policy does not
apply, this should only occur if a file has been removed from time 1
to time 2 which means a entry fully saved and only present in decr1,
such entry is then added to the resulting archive, as expected.

The situation where an entry is only present in full2 should not
arrive: such entry would have been created at time 2 and doing the
decremental backup, a "detruit" entry would have been added into decr1
to indicate this entry to be removed from filesystem when restoring
decr1 over full2, thus the overwriting policy would be triggered as
explained above leading to completely ignore such entry.

I hope the explanation are not too confusing :-)

> 
> dar 2.5.8 / debian 9
> 
> Thank you.


Cheers,
Denis
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAlzzntcACgkQCDGwvQPY
sYItFw//WMueXIgVuRS65QrSU60Kest4AVlWw58KJu9V4WH7T+wqhoVPMOtqj4bE
DA7ZqXbsPVmbRdCmEWZasVHbC7l7EpDmOE+xkr3LL8MRy/H4UaU6lXM+Vr2REnpG
U/LPrlt4ycf8LkgxZNQrcVLAw5qlkl29HdXGp+xPeipzf2WnSqop/HtBHtK3LQVl
9emXOABmkB/gOpYn2W9kXmZdfMJu1VAjpZ41cOzJ5ikSk17GS3L61jnzvkxRIBlQ
1W8sGRFzQExR0hXE7/I2OxBi4ZvKYwbP5vX6cANW4uEjlJ9so7V9EiU1kN6n6/VL
JF1Nxqod6yEf0dT9B7b2da6X/1MuL4awhsoXfg0SYNGfPg5h+A6UGxvd9uxeuwrM
GiYI9A9C84krlhcqTRkBQ29LQ3Px0X4kVwjIoJu8ncb555srXys77rfSvahnJoHH
qdVFYlOXaz00yVqmkZ60TbEpKtFwfWTmn9Ui5Dj+3FSCLN9ufsUMU2ok/EKH72EN
9OjPvULrbEhaCAN8ladt+HyfA5QmXpaE+M48hoLjQ2I6UWIIV6n+e6ss0j5KBexH
ztG8WmTGrwQeBdpPq2gVFKYYpjoNnBpS1pGNN9XkPA0rzS6DBULhF/GXBPm/oAKg
/YKiV4ZfYH8ZTxNWo+F0oBCYFSTVbVAV0y+ym49IJbdH5EVExhY=
=/DS2
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.