Date: Wed, 5 Sep 2001 17:55:13 -0400 From: "John Straiton" <jsmailing@clickcom.com> To: <freebsd-questions@freebsd.org> Subject: Problem with the Exclude option of tar Message-ID: <PHEMIEFOLOKALAMFPIPCAEELCBAA.jsmailing@clickcom.com>
next in thread | raw e-mail | index | archive | help
tar is teasing me. here's my situation: I'd like to tar.gz all the /home directories on my machine every night, into separate files (for easy restoration), however there are of course some files that I don't want copied into the tar. Lets use the file quota.users for example. I would like to use the exclude-file option of tar but here's the problem tar czfX testfile.tar.gz excluded.files /home with excluded.files simply having the line "home/quota.user" in it works fine, but tar czfX testfile.tar.gz excluded.files /home/* does not. Nor does it work with an exclude file that says: home/quota.user quota.user *.user /home/quota.user ./quota.user Which is giving me grief because my script reads like: for i in `ls /home` do tar czfX /backup-directory-structure/$i.tar.gz excluded.files /home/$i done Now I know that I could simply tell the .sh script to exclude that file, but the proper way to do it would be with tar's exclude option since it scales better. Ideas? John Straiton - ClickCom, Inc. jks@clickcom.com - (704)365-9970x101 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?PHEMIEFOLOKALAMFPIPCAEELCBAA.jsmailing>