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

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:

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

Hrrmph.  Looks like the pathname rewrite (stripping leading '/')
is getting done too late, so that the wrong filenames are
being compared.

Please check that the following does work (without the leading '/'):

    tar -cf foo.tar usr/dir_a/dir_b
    tar -uvf foo.tar usr/dir_a/dir_b

Assuming that works correctly, I know where the mistake is;
I'll have a tentative patch for you to try in a couple of hours.

Tim Kientzle




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