Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compress file while tar running

Status
Not open for further replies.

smacattack

Technical User
Jun 25, 2001
102
GB
I have created a script which runs a compress in the background and then runs a tar of oracle datafiles.

This works fine from command line but when running via crontab has memory problems and does not seem to compress.
Is there any easy way to run job through crontab which will achieve this senario.
If i compress after the tar file has been created i run out of swap, I need to run compression at same time as tar !

Any ideas.
present script like


TARPIPE=/tmp/tarfile_${ORACLE_SID}
mknod ${TARPIPE) p

.
.
.
cat $TARPIPE | compress -c ${backup_dir}/${ORACLE_SID.tar.Z &

tar cvf $TARPIPE ${backup_list} | tee ${backup_dir}/${ORACLE_SID}.log
.
.
.
.
 
Do you end up with an incomplete file, or does the job not seem to run at all? If the latter it's possibly an environment problem (cron has a very minimal set), so you need to set all required PATH variables etc within the script or a wrapper for it before giving it to cron. If that's not the problem, post back.
 
It doesn't seem to run the compress, the tar will complete until its used all swap space then fails.
It seems to create the .Z compressed file but does not contiue to write to it ?

I am sure its a enviroment problem also but surely if i am running a compress in the background all it requires is the file names input output.

Any other ideas or suggestion of securing large datafiles to another disk area. Files must be compressed due to space problem.
thanks
[hourglass]
 
can you set TARPIPE to something else than /tmp/... ?
I think you are running out of VirtMem. Are there any errors in messages file?

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
I know its running out of VirtMem ie swap space, and yes i could use another filestem for TARFILE but then i would have to run the compress after the tar file is created.
Due to space i require to compress the file at the same time as its being created ! This is the problem.

thanks

??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top