Skip to contentSkip to conversation

Tar Exclude

DISCUSSION Paul Kraus 3 participants 3 messages Nov 13, 2002 – Nov 14, 2002

lore
Share & tools
lore

Paul Kraus

author
#0 lore raw

Also I just noticed I get an error about removing leading / from member names.

Here is my archive.exclude
/backup/advserver
/backup/logs
/backup/lost+found
/backup/scripts
/backup/tar.archive

-----Original Message-----
From: Paul Kraus [mailto:[email protected]]
Sent: Wednesday, November 13, 2002 10:26 AM
To: 'Mike Dresser'
Cc: '[email protected]'
Subject: RE: Tar Exclude

Here is the script
------------------
exceptions=/backup/scripts/archive.exclude

        dt=`date +%A`
        cd /backup
        for filestotar in `ls --almost-all --directory -x1 *`
        do
                tar --directory /backup/tar.archive \
                    --create --verbose  \
                    --exclude-from $exceptions \
                    --file /backup/tmp/$filestotar.$dt.tar \
                    /backup/$filestotar/* 1>

/backup/tmp/$filestotar.$dt.index
done

-----Original Message-----
From: Mike Dresser [mailto:[email protected]]
Sent: Wednesday, November 13, 2002 10:22 AM
To: Paul Kraus
Cc: [email protected]
Subject: Re: Tar Exclude

Quoted 9 lines · Paul Kraus

When running tar with the exclude set tar creates a 10k empty tar file.

I have a script that tars a all the sub directories of a directory into individual tar files for each subdirectory. I have an exclude file that is set to skip some of the folders I don't want tarred. This

works but it creates the empty tar files. Is this normal? Can it be set not to do this?

How about showing us the line out of the script that calls tar, and a sample of your exclude line. Tar can be... tempermental when it comes to exclude's.

Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 10 lines · Paul Kraus

Also I just noticed I get an error about removing leading / from member names.

Here is my archive.exclude
/backup/advserver
/backup/logs
/backup/lost+found
/backup/scripts
/backup/tar.archive

Try putting

backup/advserver
backup/logs
backup/lost+found
backup/scripts
backup/tar.archive

Instead

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs