bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] --listed-incremental/--no-recursion inconsistencies


From: Miek Gieben
Subject: Re: [Bug-tar] --listed-incremental/--no-recursion inconsistencies
Date: Wed, 23 Feb 2005 15:15:50 +0100
User-agent: Vim/Mutt/Linux

[On 22 Feb, @ 11:07, Sergey wrote in "Re: [Bug-tar] --listed-increme ..."]
> This way the resulting file list will not contain directories.    
> 
> > % ./tar --listed-incremental bla --no-recursion --create --file 
> > hdup2.tar.gz\
> >    --gzip --verbose --files-from hdup2-filelist|grep hdup.conf.5
> 
> --no-recursion won't work with incremental backups (at least now).
> Tar should have printed the warning instead of silently ignoring
> it.
> 
> > 
> > Is there some other way (or a new option) which should be used to
> > force tar to include everything once and still be able to use
> > --no-recursion, --files-from and --listed-incremental?
> 
> Try creating filelist the way described above.

I've been throwing a quick look at tar 1.15.1 to see why it adds
stuff multiple times, while it should not. As I'm not intimate with the
tar source code, I've only made the changes that make tar do
what I want, without regarding the other options.

This is with tar --no-recursion --listed-incremental --files-from
The files-from lists everything that should be backed up, both files 
and directories.

% pwd
/tmp/tar-1.15.1
% find . -name "*" -print > tar-1.15.1-filelist

Next:
% ./src/tar --verbose --create --no-recursion --file tar.tar \
   --listed-incremental incfile --files-from tar-1.15.1-filelist |grep volume
./src/tar: ./tests/star: Directory is new
./src/tar: ./tests/.deps: Directory is new
./src/tar: ./lib/.deps: Directory is new
./src/tar: ./rmt/.deps: Directory is new
./src/tar: ./src/.deps: Directory is new
./src/tar: ./tar.tar: file is the archive; not dumped
./tests/volume.at
./tests/volume.at

So tests/volume.at is dumped twice. Next if I redo the increment dump, 
it only dumps the directories as expected.

All dumping of files is handled by dump_file(), which is called 
(among others) in create.c.

In the function create_achive() (create.c) it is called twice once at line 1148
and then again at 1178. If I comment out the dump_file from line 1178, and then
recompile and redo my test:

% ./src/tar --verbose --create --no-recursion --file tar.tar \
  --listed-incremental incfile --files-from tar-1.15.1-filelist |grep volume
./src/tar: ./tests/star: Directory is new
./src/tar: ./tests/.deps: Directory is new
./src/tar: ./lib/.deps: Directory is new
./src/tar: ./rmt/.deps: Directory is new
./src/tar: ./src/.deps: Directory is new
./src/tar: ./tar.tar: file is the archive; not dumped
./tests/volume.at

It only includes volume.at only once, maybe the second dump_file() should not
be called when --no-recursion is given?

I'm I on the right track here?

Thanks,

grtz Miek




reply via email to

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