Re: Tar options in hdup?

Miek Gieben <[email protected]> Fri, 14 May 2004 11:13:47 +0200
Newsgroups gmane.comp.sysutils.backup.hdup.general
Message-ID <[email protected]>
[On 14 May, @01:25, James wrote in "[hdup-user] Tar options in hdu ..."]
> For history here's my original thread:
> http://article.gmane.org/gmane.comp.sysutils.backup.hdup.general/109/match=mysqlhotcopy
> 
> But the upshot is that tar appears to consider a current "ctime" as a
> reason to back something up even though the modification (mtime) is
> not recent. Since I use mysqlhotcopy to back up mysql databases before
> hdup archives them, they always have a current ctime even though the
> mtime may be unchanged for some tables that really have not changed.
> 
> Anyway I had basically removed all code comparing ctime from the tar
> source and recompiled. It seemed to work for a while and suddenly my
> backups started getting huge again.

And the you always used the same version of tar?

> I am wondering: What options does hdup invoke tar with as of the
> current version? Did this possibly change at any point in the last 4
> months?

Well, looking at the changelog:

20 Mar 2003: compression got lifted from tar 
17 Apr 2003: rewrote setup_tarcmd (but did not change the options)

All tar stuff is localized in setup_tarcmd(), which among other things
include:
        tar = (char*) xmalloc(LEN(host->tar) +
                        LEN(TAR_NONE) +
                        LEN("--files-from") +
                        LEN(host->filelist) +
                        LEN("--listed-incremental") +
                        LEN(host->inclist) +
                        LEN("--exclude-from") +
                        LEN(host->excludelist) +
                        LEN(SPARSE) + 2 +
                        LEN("--ignore-failed-read") + compmax_len +
                        compmax_len + 4 + /* strlen(comp) */
                        LEN(ONEFILE) +
                        LEN(MUTE) + 18 );

So the options are pretty obvious, nothing special here. The only one
you might be interested in is '--listed-incremental' which is supposed
to figure out what to backup. This option list has been pretty stable
since the first 1.6 release.

The only addition was to enable --sparse at same point (haven't
written that down in the Changelog though...)

grtz Miek