From owner-freebsd-questions@FreeBSD.ORG Sun Oct 17 14:15:29 2004 Return-Path: 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 C4A5916A4D5 for ; Sun, 17 Oct 2004 14:15:29 +0000 (GMT) Received: from biggie.spekt.net (biggie.spekt.net [67.18.79.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97F2F43D49 for ; Sun, 17 Oct 2004 14:15:28 +0000 (GMT) (envelope-from radek@raadradd.com) Received: from raadradd.homeunix.org (bwv9.neoplus.adsl.tpnet.pl [83.29.245.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by biggie.spekt.net (Postfix) with ESMTP id 5BB05401D; Sun, 17 Oct 2004 16:15:21 +0200 (CEST) Received: by raadradd.homeunix.org (Postfix, from userid 1001) id 53B04A564; Sun, 17 Oct 2004 16:15:25 +0200 (CEST) Date: Sun, 17 Oct 2004 16:15:25 +0200 From: Radek Kozlowski To: Oliver Fuchs Message-ID: <20041017141525.GB37640@werd> References: <20041017132420.GA1896@oliverfuchs.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20041017132420.GA1896@oliverfuchs.ath.cx> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: tar a complete drive excluding one directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2004 14:15:29 -0000 On Sun, Oct 17, 2004 at 03:24:45PM +0200, Oliver Fuchs wrote: > Hi, > > I want in FreeBSD RELEASE 5.2.1 tar a complete / system except one directory > e.g. /mnt where I want to store the tar archive. > In linux I do: > > cd / > tar cvzf /mnt/root.bak-$(date +%Y%m%d).tar.gz . --exclude=proc --exclude=mnt > > Trying this in FreeBSD is not accepted because tar is still trying to tar > the /mnt directory and the to be made archive. Try: # tar --exclude=proc --exclude=proc -cvzf \ /mnt/root.bak-$(date +%Y%m%d).tar.gz . -Radek