Skip site navigation (1)Skip section navigation (2)
Date:      09 Sep 2005 14:33:37 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        gjbailey@gmail.com
Cc:        kientzle@freebsd.org, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: tar -u adds all files regardless of mod date
Message-ID:  <44u0guw0ou.fsf@be-well.ilk.org>
In-Reply-To: <48a5f32a05090901591a16c062@mail.gmail.com>
References:  <48a5f32a05090901591a16c062@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Gareth Bailey <gjbailey@gmail.com> writes:

> I have a directory I want to backup at /usr/dir_a/dir_b.
> I want to back the content of this dir to /usr/backups/dir_b
> so I tried the following:
> 
> # cd /usr/backups/dir_b
> # tar -cf dir_b.tar /usr/dir_a/dir_b
> 
> Now I have dir_b.tar which is 65MB in size.
> If i then try to update modified files by doing this:
> 
> # tar -uf dir_b.tar /usr/dir_a/dir_b
> 
> and I end up with dir_b.tar being 130MB (double size) which
> should not be the case since no files have been modified in
>  /usr/dir_a/dir_b.
> 
> I do not get this problem if I do the same in the /usr/dir_a
> directory. In the /usr/dir_a dir the tar file remains the same
> size.
> 
> I would much appreciate some input!

[This essentially adds up to doing 
 # tar -cf foo.tar $target_path
and then immediately 
 # tar -uvf foo.tar $target_path
shows an update.]

You didn't list any information about your system, so I don't even
know whether you're using the Gnu tar or the libarchive one, which 
has been standard for a few months now.

However, I'm seeing something like that on RELENG_5, with the new
tar.  It isn't happening to all files, though, and I haven't 
figured out why it's picking the files it is...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44u0guw0ou.fsf>