Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2002 09:49:54 -0400 (EDT)
From:      Dru <dlavigne6@cogeco.ca>
To:        "Philip J. Koenig" <pjklist@ekahuna.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: More tar problems
Message-ID:  <20020520094005.J54198-100000@cogeco.ca>
In-Reply-To: <20020520050250032.AAA423@empty1.ekahuna.com@pc02.ekahuna.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 19 May 2002, Philip J. Koenig wrote:

> It seems like some aspects of tar have changed since earlier 4.x
> FreeBSD.  I used to use the following command to facilitate copying
> filesystems from an old hard disk to a new one, but it no longer
> works on 4.6-PRE:
>
> tar clf - -C /start_dir -X /excluded_dir -X /another_excluded_dir . | tar xpvf - -C /destination_dir
>
> ("dir" also means "filesystem")
>
> Problem seems to be it ignores the "-X" option. I get this kind of
> result:
>
> tar: can't add file -X : No such file or directory
> tar: Removing leading / from absolute path names in the archive.
>
>
> So it seems it ignores the -X option and then tries to add the
> argument to the -X option to the archive.  I also tried "--exclude-
> from" instead of -X, same result.


Hi Philip,

Have you tried echoing the names of the excluded files/directories/file
systems to a file and telling -X about that file? For example, this works for
me on 4.5:

echo /usr > exclude

tar czvfX backup.tar exclude /

HTH,

Dru


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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