Rule n.1:
never run tar inside the same folder you are tarring: tar will include the tar-file that it's creating... CRAZY!
Rule n. 2:
--exclude works only if it's the first parameter after tar... IN SOME versions of tar ONLY.... CRAZY!
in my version it has to come last.
cd /opt/oracle/backups
tar cvzf osbpr1dobackup11Nov2013_108.tar.gz /opt/oracle/domains/osbpr1do/ --exclude=/opt/oracle/domains/osbpr1do/shared/store/jms
Rule n. 3:
if the exclude folder ends in /, tar will ignore it without warning.... CRAZY!
That's why I never use tar but rather jar.
never run tar inside the same folder you are tarring: tar will include the tar-file that it's creating... CRAZY!
Rule n. 2:
--exclude works only if it's the first parameter after tar... IN SOME versions of tar ONLY.... CRAZY!
in my version it has to come last.
cd /opt/oracle/backups
tar cvzf osbpr1dobackup11Nov2013_108.tar.gz /opt/oracle/domains/osbpr1do/ --exclude=/opt/oracle/domains/osbpr1do/shared/store/jms
Rule n. 3:
if the exclude folder ends in /, tar will ignore it without warning.... CRAZY!
That's why I never use tar but rather jar.