tar doesn't exclude files on my new lfs system

Gerard Beekmans gerard at linuxfromscratch.org
Mon Mar 4 07:20:56 PST 2002

On Sun, Mar 03, 2002 at 01:11:53PM +0100, Michael Wahlbrink wrote:
> Hi,
> I've just finished my installation of lfs 3.2-rc2. All woks fine until I
> want to make a backup from the new system. I used my 'standard tar-line' to
> backup the hole system without /usr/src  and /data . But no chance tar
> backed up all files and does not exclude the directories as it does on my
> SuSE systems.
> Here's my line:
>  tar -cvj --atime-preserve \
>      --exclude=/data/* \
>      --exclude=/usr/src/* \
>      --file=/data/backup-lfs.tar.bz2 \
>      /*
> What's going wrong here??
> Any hints???

The tar you're using is a little bit broken when it comes to --exclude. To
make it work you can use --exclude=data for example, but that'll exclude
any data directory it finds, not just the /data directory.

So how to get it to work? Go to ftp://alpha.gnu.org/pub/gnu/tar and
download the latest tar there. It's actually a very stable tar version so
don't get discouraged by the name 'alpha'. For what it's worth: I've been using it
for a very long time now and never had any problems. and --exclude works
like you expect it to.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list