[CentOS] tar exclude question

Rainer Traut tr.ml at gmx.de
Tue Mar 15 11:53:42 UTC 2011


Am 15.03.2011 10:37, schrieb Luigi Rosa:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rainer Traut said the following on 15/03/11 10:25:
>
>> This always sends me an unwanted email with:
>> tar: Removing leading `/' from member names
>
> Redirect the stdout/stderr to some file:
>
> tar cvzf /mnt/mybackup.tgz /foo /bar>  /var/log/backup 2>  /var/log/backuperrors

Yes Luigi,
I know how to do this... but cron has the ability to send mail (I only 
want to see real error messages) and tar just does not behave right - no 
output if no error occured.

>> Because the exclude pattern matches under dir1 my important File is not
>> backed up. The problem is, I cannot specify the exclude pattern to match
>> only /tmp/foo/dir2 , can I?
>
> It's a matter of personal taste, but I find more useful the -X (or
> - --exclude-from) option

Yes, personal taste, but in crontab confusing not seeing the excludes 
and besides that it has the same problem.

Rainer



More information about the CentOS mailing list