[Top][All Lists]

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

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

From: Sergey Poznyakoff
Subject: Re: [Bug-tar] --listed-incremental/--no-recursion inconsistencies
Date: Tue, 22 Feb 2005 12:07:40 +0200

Miek Gieben <address@hidden> wrote:

> create filelist of the directory we want to backup:
> find /tmp/hdup2 -name "*" -print > TEST/hdup2-filelist
> % ./tar --create --file hdup2.tar.gz --gzip --verbose --files-from \
>   hdup2-filelist |grep hdup.conf.5
> ./tar: Removing leading `/' from member names
> /tmp/hdup2/doc/hdup.conf.5
> /tmp/hdup2/doc/hdup.conf.5
> /tmp/hdup2/doc/hdup.conf.5
> All files are now three times included...? 

Of course they are included thrice. The output from `find /tmp/hdup2
-name "*"' contains:


When archiving, tar first descends into /tmp/hdup2 subdirectory and
archives all its contents, including /tmp/hdup2/doc/hdup.conf.5, then
it sees `/tmp/hdup2/doc/' line, descends into the subdirectory
and archives its contents, again including hdup.conf.5. Finally, it
reads `/tmp/hdup2/doc/hdup.conf.5' line and archives the file. Hence
three copies. In other words, nomber of copies of each file
archived this way equals to the nesting depth of this file beneath
the first directory.

As you have correctly stated, --no-recursion should be used here.

Another way would be to use the following command to obtain
the file list:

    find /tmp/hdup2/ -not -type d -print

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

> 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.


reply via email to

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