bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu tar w/ --listed-incremental --files-from


From: Miek Gieben
Subject: Re: gnu tar w/ --listed-incremental --files-from
Date: Sat, 25 Jan 2003 00:19:32 +0100
User-agent: Vim/Mutt/Linux

[On 22 Jan, @15:26, Stepan wrote in "Re: gnu tar w/ --listed-increm ..."]
> Hello,
>       thank you for your bug report.
> 
> On Wed, Jan 15, 2003 at 10:44:41AM +0100, Miek Gieben wrote:
> > simular to this: tar --files-from FILELIST --listed-incremental INCLIST.
> > 
> > Now if I list directories in FILELIST, incremental backups work, but if I
> > list specific files in FILELIST, they are always stored in the archive.
> > 
> > Is this a bug?
> 
> last time I saw the source code, I noticed that tar will probably behave
> this way.  But the source seemed quite confusing to me and I thought
> noone will actually encounter the bug.
> 
> You did.  :-)
> 
> OK, I'd say this _is_ a bug.
> 
> But I'm not brave enough to fix it.  I don't know whether the tar
> maintainer has enough energy to work on it.

ok , I search some more. Forget my previous email. That did something, but
I didn't create incremental archives.

But in dump_file in create.c on line 858 is says:
  if (!incremental_option && !S_ISDIR (current_stat.st_mode)
      && current_stat.st_mtime < newer_mtime_option
      && (!after_date_option || current_stat.st_ctime < newer_ctime_option))
        
If I change that into:

if ( current_stat.st_mtime < newer_mtime_option )

I get what I want, incremental archives even when listing the files to backup
in a files-from. Like this:

[elektron ~/tmp/tar-1.13/src]
$ cat files_to_do 
.
ansi2knr.c
arith.c
buffer.c
compare.c
create.c
delete.c
extract.c
incremen.c
list.c
mangle.c
misc.c
names.c
open3.c
rmt.c
rtapelib.c
tar.c
update.c

$ ./tar --listed-incremental files_incremental --verbose --create --file 
/tmp/test.tgz --gzip --files-from files_to_do .
./tar: .: is unchanged; not dumped
ansi2knr.c
arith.c
buffer.c
compare.c
create.c
delete.c
extract.c
incremen.c
list.c
mangle.c
misc.c
names.c
open3.c
rmt.c
rtapelib.c
tar.c
update.c
./ansi2knr.c
./arith.c
./buffer.c
./compare.c
./create.c
./delete.c
./extract.c
./files_incremental
./incremen.c
./list.c
./mangle.c
./misc.c
./names.c
./open3.c
./rmt.c
./rtapelib.c
./tar.c
./update.c

[elektron ~/tmp/tar-1.13/src]
$ touch update.c

[elektron ~/tmp/tar-1.13/src]
$ ./tar --listed-incremental files_incremental --verbose --create --file 
/tmp/test.tgz --gzip --files-from files_to_do .
./tar: .: is unchanged; not dumped
./tar: ansi2knr.c: is unchanged; not dumped
./tar: arith.c: is unchanged; not dumped
./tar: buffer.c: is unchanged; not dumped
./tar: compare.c: is unchanged; not dumped
./tar: create.c: is unchanged; not dumped
./tar: delete.c: is unchanged; not dumped
./tar: extract.c: is unchanged; not dumped
./tar: incremen.c: is unchanged; not dumped
./tar: list.c: is unchanged; not dumped
./tar: mangle.c: is unchanged; not dumped
./tar: misc.c: is unchanged; not dumped
./tar: names.c: is unchanged; not dumped
./tar: open3.c: is unchanged; not dumped
./tar: rmt.c: is unchanged; not dumped
./tar: rtapelib.c: is unchanged; not dumped
./tar: tar.c: is unchanged; not dumped
update.c
./files_incremental
./update.c





reply via email to

[Prev in Thread] Current Thread [Next in Thread]