Re: questions about --retry-on-change and --ref

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On 23/04/2021 18:23, imschmeg wrote:
> With "--retry-on-change 0", will the resulting dar backup record
> anything about a file that changed while being read?  

yes, it will save the file once and flag it as "dirty". Setting this
option to zero just avoid dar/libdar to retry saving it, in the hope to
have is backed up at a time it did not change.

> 
> If the file being changed stops changing prior to the dar backup
> completing, but late enough for that backup to abandon it, will a
> subsequent dar incremental backup using this one as --ref pick up the
> changes?

Not sure to understand what you mean, either the file changed at the
time it was read by dar for backup or it didn't change. I may change
while dar is running before or after it has been saved this is not a
problem.

When doing a differential backup, a dirty entry found in the archive of
reference always lead dar to consider the file has change since the
archive of reference ans "subsequent dar incremental backup ... [will]
pick up the changes" to use your words. However if the files is changing
again, it will be flagged as dirty in the differential backup.

> 
> If one dar archive is itself still being written while being used as a
> --ref argument for another, what will happen?  

First, this is not supported. To use an archive as reference it must be
completed. Second dar will not be able to read an archive until it
completes as before it will lack the catalogue (=table of content). You
can however feed a archive of reference with --sequential-read mode, in
that case if the archive of reference is under construction by a first
dar instance and some data is lacking for a second instance of dar to
read it, the system will suspend this second dar instance up to the time
some data is available for reading.

> I am triggering a dar
> backup (with --retyr-on-cahnge 0) after a user logs out, and there is a
> small possibility that the user will log in and out again before the
> first backup completes, and that the second backup will --ref the
> first. I am wondering if dar itself will fail gracefully in this case,
> or whether I have to use some mechanism to prevent any such overlap.

For the second login/logout of the user the dar command will fail not
being able to read the archive of reference (as it is still not
completed). You can check dar exit code in you script to handle this
situation.

> 
> 
>
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
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.