Re: Is there a way to get a different return-code when incremental backup didn't actually find a difference?

Daniel <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <CADu+_As5OpPC8OzLBZq7DAdpiu2XLXUOB2=-ZAZn7VWZq2HfkA@mail.gmail.com>
Hi Joost!

I have a few ideas, but the answer will not be too professional, sorry bout
that :-):

1. When running dar, you can direct the output to a file, for instance:
dar ... > /backup/date.log
This file contains lines that start with "Adding file" or "Adding folder"
and that is what exactly means there has been changes (besides perhaps
permission-changes, that might be with other strings).
If there is no change, then there are none of the strings above in the file
which can be checked easily with a grep and after you can easily delete the
archive created with no data.

2. You can use -T option aswell to get info about what was archived with
minimal scripting.

2. We got here the option "-d" which diffs the archive and the place to be
backed up. You can use this option to tell before backing up if it will
save anything (simple greps and scripting again).

3. Usualy stroage costs less than retrieval, so if that is the case, you
must know that when in need of specific files or dirs, the log file you can
create in my "1." above can be used to tell which archive contains the most
recent version of the file for instance. Directories can be a bit more
problematic because of lot of files, but you can tell when anything was
archived in that dir and which archive contains it.
Also you can use the command that Denis gave us few years ago to even tell
which slice contains the file or dir that needs to be retrieved:
"./dar -t /path/to/backup/with/backuparchive -al -E "touch %b.%N.%e" -g
etc/xml/xml-core.xml | sed -rn -e 's/.*\s+(.*\.[0-9]+.dar) has a bad or
corrupted.*/\1/p'"
(you can search for this in the forum)
Actually I have created a good method with the above (100% thanks to Denis
of course) to minimize costs when using Azure cold storage where the
retrieval costs tons compared to storage :-)

Hope I helped anything... :-)

Regards,
Daniel


J. Roeleveld via Dar-support <[email protected]> ezt írta
(időpont: 2021. okt. 10., V, 15:28):

> On Sunday, October 10, 2021 12:15:50 PM CEST Denis Corbin wrote:
> > On 10/10/2021 09:28, J. Roeleveld via Dar-support wrote:
> > > Hi All,
> >
> > Hi,
> >
> > > I am creating incremental backups automatically and prefer not to look
> at
> > > the process too much as I've got other things to do :)
> > >
> > > In order to avoid keeping "unnecesssary" incremental backups, is there
> a
> > > way to get DAR to report if there was actually a change since the
> > > reference backup?
> >
> > Today there is no such exit code, feel free to add a feature request at
> > https://sourceforge.net/p/dar/feature-requests/
> >
> > For a live filesystem such condition should be very unfrequent, and
> > second, the storage gain not saving a differential backup that has no
> > file saved in it is very little: its usually a matter of a few tens or
> > hundreds of kilobytes depending of the number of files in the backup
> scope.
>
> Denis,
>
> Thank you for the quick answer.
> I have several filesystems where occasionally, new files will be added.
> Most of
> the time, they are quite static and nothing actually changes.
>
> I agree the filesize doesn't matter much, but the additional files to go
> through
> when restoring will be quite a lot and I'd prefer to already remove these
> "empty" backups before uploading them to cloud-storage (where they will
> incur
> costs for storage and retrieval)
>
> --
> Joost
>
>
>
>
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.