Home » RDBMS Server » Backup & Recovery » rman backup script not running??
rman backup script not running?? [message #236664] |
Thu, 10 May 2007 10:43  |
shaseeb
Messages: 113 Registered: April 2007 Location: Madison, WI
|
Senior Member |
|
|
Hi all,
I have created an rman cold backup script and when I run it, it just hangs...I mean nothings happens. Here is my script and the output when I run it:
##########################
# RMAN Cold Backup Script
##########################
#!/bin/bash
date
set ORACLE_SID=fprcdev
echo "RMAN Cold Backup about to begin for $ORACLE_SID ..."
rman
connect CATALOG rman/rman@fprccat
connect TARGET sys/passwd@fprcdev
run {
shutdown immediate
startup mount
allocate channel d1 type disk;
backup full
tag cold_backup
(database);
release channel d1;
alter database open
}
echo "RMAN Cold Backup for $ORACLE_SID is complete"
[oracle@rh-development scripts]$ ./backup_cold.sh
Thu May 10 10:36:54 CDT 2007
RMAN Cold Backup about to begin for FPRCDEV ...
|
|
|
|
|
|
|
Re: rman backup script not running?? [message #236691 is a reply to message #236686] |
Thu, 10 May 2007 11:24   |
shaseeb
Messages: 113 Registered: April 2007 Location: Madison, WI
|
Senior Member |
|
|
Ok. Well, we are not doing online backups because it's a dev environment. It's weird right now because this dev is the prod too. We are building the dev, stag and prod environments right now.
But thanks for your help all. I will try the backup after hours and if it still doesn't work then I shall post something.
Just a quick question. Can I put in comments with echo inside the RMAN script?
like
run{
echo "Database is shutting down"
shutdown immediate
echo "Database has been shutdown successfully"
..
..
[Updated on: Thu, 10 May 2007 11:24] Report message to a moderator
|
|
|
|
|
|
|
Re: rman backup script not running?? [message #236991 is a reply to message #236734] |
Fri, 11 May 2007 09:20   |
shaseeb
Messages: 113 Registered: April 2007 Location: Madison, WI
|
Senior Member |
|
|
Ok, I ran the script yesterday and it dodn't run. However, I think that I have figured out part of the problem. For some reason it is not going to the next line it my script. Here is my modified script;
##########################
# RMAN Cold Backup Script
##########################
#!/bin/bash
date
ORACLE_SID=fprcdev; export ORACLE_SID
export ORACLE_HOME
echo "RMAN Cold Backup about to begin for $ORACLE_SID ..."
$ORACLE_HOME/bin/rman - - - - - it is not executing below this line
connect CATALOG rman/rman@fprccat
connect TARGET sys/passwd@fprcdev
run {
shutdown immediate
startup mount
backup full database;
alter database open
}
echo "RMAN Cold Backup for $ORACLE_SID is complete"
[oracle@rh-development scripts]$ ./backup_cold.sh
Fri May 11 09:16:16 CDT 2007
RMAN Cold Backup about to begin for fprcdev ...
Recovery Manager: Release 10.2.0.3.0 - Production on Fri May 11 09:16:16 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN>
[Updated on: Fri, 11 May 2007 09:21] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri May 02 14:23:49 CDT 2025
|