Operating System - HP-UX
1829413 Members
2009 Online
109991 Solutions
New Discussion

Script with Pipe breaks in between

 
SOLVED
Go to solution

Script with Pipe breaks in between

My Oracle hot backup script is as follow:
alter tablespace SYSTEM begin backup;
!/usr/bin/cat /ptwb_hot_pipe | /usr/bin/compress
> /u60/backup/HBKP$TODAY/system_ptwb01.dbf.Z &
!/bin/cp /u04/oradata/PTWB/data/system_ptwb01.dbf /ptwb_hot_pipe
alter tablespace SYSTEM end backup;
Similar for another 60 tablespaces. In Oracle 8 and HP-UX 10.20, I never had a
problem. The process used to take 1.5 hours. Recently I migrated to Oracle 9i
on HP-UX 11i. This process is real fast. Gets over in approximately 20 minutes.
But the problem is that in between, it comes out of the backup script and gives
an error on /bin/cp. /ptwb_hot_pipe not found
5 REPLIES 5
Dave La Mar
Honored Contributor

Re: Script with Pipe breaks in between

Logan -
The only obvious thing I see is that I doubt
/ptwb_hot_pipe exists.
Did you mean to say /some_directory_path/ptwb_hot_pipe ?

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."

Re: Script with Pipe breaks in between

Dave,

The pipe exists. It is in /. Out of 60 tablespaces, I am able to backup 30. Then it breaks up. It throws /bin/cp error saying that it is not able to locate pipe. So I broke this script into 3 identical parts. It runs O.K. I want to run it in a single stretch. I used to run in single stretch in Oracle 8/ HP-UX 10.20. I am going to run it tonight and post the exact error. Thanks.
Jordan Bean
Honored Contributor
Solution

Re: Script with Pipe breaks in between


Forgive me, but I do not understand the need for the named pipe. Would it be easier to directly compress the tablespaces to the backup files?

ALTER TABLESPACE table BEGIN BACKUP;
!compress < /u04/...dbf > /u60/...dbf.Z
ALTER TABLESPACE table END BACKUP;

Graham Cameron_1
Honored Contributor

Re: Script with Pipe breaks in between

I look forward to seeing the log you post, but I have to agree with Jordan, why the pipe ?

You can replace your 2 shell commands with 1:
--
!/usr/bin/compress -c /u04/oradata/PTWB/data/system_ptwb01.dbf > /u60/backup/HBKP$TODAY/system_ptwb01.dbf.Z
--
BTW, these days I think gzip is regarded as superior to compress. See
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x0d651012aa92d5118ff10090279cd0f9%2C00.html
--
-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.

Re: Script with Pipe breaks in between

/bin: permission denied is the exact error message. I am going to try the other alternatives mentioned in your posting, either direct compress w/o pipe or gzip after reading the referred article. Thanks much.