From owner-freebsd-questions@FreeBSD.ORG Thu Sep 22 04:22:16 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCDE216A41F for ; Thu, 22 Sep 2005 04:22:16 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4890743D46 for ; Thu, 22 Sep 2005 04:22:16 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id j8M4MCOZ054091; Wed, 21 Sep 2005 21:22:13 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <43323174.5030707@freebsd.org> Date: Wed, 21 Sep 2005 21:22:12 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lowell Gilbert References: <48a5f32a05090901591a16c062@mail.gmail.com> <44u0guw0ou.fsf@be-well.ilk.org> In-Reply-To: <44u0guw0ou.fsf@be-well.ilk.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: gjbailey@gmail.com, freebsd-questions Subject: Re: tar -u adds all files regardless of mod date X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2005 04:22:16 -0000 Gareth Bailey 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