- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: oracle backup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 11:56 PM
03-25-2008 11:56 PM
oracle backup
thanks all
we are running the rman script for backup
for full and incremental backup.
every time we have to run manually the script
like run {execute script full_backup:}
how we can automate this on OS level
or there is any other script available which will help
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 01:16 AM
03-26-2008 01:16 AM
Re: oracle backup
You can automate this in two ways.
1. Using the OEM database control
2. Using the cron
For 1. goto http://
then to the "Maintenance" tab, configure the RMAN settings in the "Backup/Recovery" and "Backup/Recovery Settings" sections.
(if you need any further assitance, please let us know)
For 2. create a crontab entry as follows:
#*******************************************************************************
# min|hour |day |month|day | |script
# | |of mo| |of wk| |
#----|-----|-----|-----|-----|-------|-----------------------------------
#*******************************************************************************
59 23 * * * echo "/home/yogeeraj/admin/scripts/oracle/rman/rman_full.sh;exit"|su - oracle 1>/home/yogeeraj/admin/logfiles/oracle/output-rman_full.crn 2>/home/yogeeraj/admin/logfiles/oracle/error-rman_full.crn
#
#*******************************************************************************
# END OF TABLE day0->Sunday day6->Saturday
#*******************************************************************************
The above example is for the crontab of the superuser (root) and assuming that your rman script works correctly when run under the Oracle user.
Hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 03:23 AM
03-26-2008 03:23 AM
Re: oracle backup
thanks lot
we are using folowing rman script
12] % rman catalog=rman/rman target=sys/redhat
Recovery Manager: Release 10.2.0.3.0 - Production on Wed Mar 26 16:50:16 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CIEHO (DBID=103616347)
connected to recovery catalog database
RMAN> print script full_backup
2> ;
printing stored script: full_backup
{configure channel device type 'sbt_tape' clear;
configure controlfile autobackup on;
configure backup optimization on;
configure retention policy to recovery window of 7 days;
backup
format 'bk_%d_%u_%s_%p'
incremental level 0 tag ='FULL_BACKUP' database filesperset 2;
sql 'alter system switch logfile';
sql 'alter system archive log current';
backup
format 'arc_%d_%u_%s_%p'
archivelog all;
DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
}
How this script BE scheduled throgh cron tab
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 08:05 PM
03-26-2008 08:05 PM
Re: oracle backup
First of all you will need to create a shell script that you can later schedule using the CRON.
e.g. rman_full.sh
#!/bin/sh
#Script Name: rman_full.sh
#Description: Incremental backup of database and archived redolog files
messagelog="/home/yogeeraj/scripts/oracle/rman/logfiles/rman_full-$(date +%d%m%y-%H%M).log"
export NLS_DATE_FORMAT='dd-Mon-yyyy HH24:mi:ss'
rman target target sys/redhat rcvcat rman/rman@catdb.mydb.mu msglog $messagelog <
run {
full_backup;
}
exit;
EOF
Question: What is the size of your database?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 08:08 PM
03-26-2008 08:08 PM
Re: oracle backup
First of all you will need to create a shell script that you can later schedule using the CRON.
e.g. rman_full.sh
#!/bin/sh
#Script Name: rman_full.sh
#Description: Incremental backup of database and archived redolog files
messagelog="/home/yogeeraj/scripts/oracle/rman/logfiles/rman_full-$(date +%d%m%y-%H%M).log"
export NLS_DATE_FORMAT='dd-Mon-yyyy HH24:mi:ss'
rman target target sys/redhat rcvcat rman/rman@catdb.mydb.mu msglog $messagelog <
run {
full_backup;
}
exit;
EOF
Question: What is the size of your database?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:46 AM
03-27-2008 03:46 AM
Re: oracle backup
thanks lot
We copy u script and created .sh file like
/script/rman_full.sh
#!/bin/sh
#Script Name: rman_full.sh
#Description: Incremental backup of database and archived redolog files
messagelog="/home/shabir/scripts/oracle/rman/logfiles/rman_full-$(date +%d%m%y-%H%M).log"
setenv NLS_DATE_FORMAT='dd-Mon-yyyy HH24:mi:ss'
rman catalog=rman/rman target sys/redhat msglog $messagelog
<
run {
execute script full_backup;
}
exit;
EOF
* kindly see if there is any changes required
pls confirm we have to run this script under oracle user
and what should be the ownership and permission to script file.
* total size of database is 300gb
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 09:24 PM
03-27-2008 09:24 PM
Re: oracle backup
pls waiting u update
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 09:37 PM
03-27-2008 09:37 PM
Re: oracle backup
>Your script
Looks ok. You can as well try to run it manually (using the oracle user) before scheduling it.
> pls confirm we have to run this script under oracle user and what should be the ownership and permission to script file.
The Oracle user should have execute permissions. You may as well change the file ownership to oracle:dba
e.g. (chown oracle:dba /script/rman_full.sh)
# ll /script/rman_full.sh
-rwxr-xr-x 1 oracle dba 1383 Mar 6 14:24 /script/rman_full.sh
#
>total size of database is 300gb
have you considered doing an increamental merge backup? I think it would be more efficient for you.
What about the nice RMAN compression features?
revert.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 09:53 PM
03-27-2008 09:53 PM
Re: oracle backup
Note that RMAN (10G) now allows Fast Incremental Backups.
It backups up only those blocks that have changed since a previous backup.
Obviously, this brings along the following benefits:
i. Reduced disk space usage (since smaller backup-pieces generated)
ii. Faster backup
Also, note that Oracle 10g offers a new feature, called block "Change Tracking".
This feature allows for faster incremental backups.
With the help of a "tracking file", the database level block changes are tracked and Oracle logs changes to the blocks in this tracking file. And then during the incremental backup, RMAN reads the tracking
file to determine changed blocks. This obviates the need to read each and every block in a datafile and thus results in faster incremental backups.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2008 09:34 PM
03-28-2008 09:34 PM
Re: oracle backup
thanks for u valuable inputs
pls find below the script
#!/bin/sh
#Script Name: rman_full.sh
#Description: Incremental backup of database and archived redolog files
messagelog=" +%d%m%y-%
H%M).log"
setenv NLS_DATE_FORMAT 'dd-Mon-yyyy HH24:mi:ss'
rman catalog=rman/rman target sys/redhat msglog $messagelog
<
run {
execute script full_backup;
}
exit;
EOF
out put executing under oracle user
#!/bin/sh
#Script Name: rman_full.sh
#Description: Incremental backup of database and archived redolog files
messagelog="/home/shabir/scripts/oracle/rman/logfiles/rman_full-$(date +%d%m%y-%
H%M).log"
setenv NLS_DATE_FORMAT 'dd-Mon-yyyy HH24:mi:ss'
rman catalog=rman/rman target sys/redhat msglog $messagelog
<
run {
execute script full_backup;
}
exit;
EOF
which steps fails this script
what should be permission of
/home/shabir/scripts/oracle/rman/logfiles/rman_full-$(date
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2008 11:26 PM
03-28-2008 11:26 PM
Re: oracle backup
out put of script executing under oracle user
[4] % ./rman_full.sh
./rman_full.sh[5]: setenv: not found.
RMAN-00557: could not open MSGLOG "/home/shabir/scripts/oracle/rman/logfiles/rman_full-290308-1254.log"
Recovery Manager: Release 10.2.0.3.0 - Production on Sat Mar 29 12:54:50 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CIEHO (DBID=103616347)
connected to recovery catalog database
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2008 12:02 AM
03-29-2008 12:02 AM
Re: oracle backup
the script is not able to create the file: /home/shabir/scripts/oracle/rman/logfiles/rman_full-290308-1254.log
can you verify if the directory exists and also execute this following command:
touch /home/shabir/scripts/oracle/rman/logfiles/rman_full-290308-1254.log
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2008 06:51 AM
03-29-2008 06:51 AM
Re: oracle backup
yes there was permission problem,
it creating the file.
while running script it is not executing the rman script but displays only rman prompt
like
% ./rman_full.sh
RMAN>
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 10:40 PM
03-31-2008 10:40 PM
Re: oracle backup
thanks lot for help
kindly provide me more inputs to resolve this issue
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 10:52 PM
03-31-2008 10:52 PM
Re: oracle backup
Then you get the "RMAN>" prompt, it may mean that the backup is currently in execution. It may take some time before the backup completes.
To view the status, you may wish to open another telnet/ssh session and launch the following command:
tail -f "/home/shabir/scripts/oracle/rman/logfiles/rman_full-$(date +%d%m%y-%H%M).log"
also, "ps -ef|grep rman" to see if the process is running.
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 03:02 AM
04-02-2008 03:02 AM
Re: oracle backup
the following entry are seen in log file
home/shabir/scripts/oracle/rman/logfiles/
rman_inc-020408-1617.log
Recovery Manager: Release 10.2.0.3.0 - Production on Wed Apr 2 16:17:18 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CIEHO (DBID=103616347)
connected to recovery catalog database
RMAN>
Recovery Manager complete.
pls how i can see the backup is completed sucessfully.
regards
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 03:31 AM
04-02-2008 03:31 AM
Re: oracle backup
Just give following command at RMAN prompt.
RMAN> list backupset summary;
It will show all completed backup summary.
If u have successfully completed a backup then it should get listed in above command's o/p.
Also to get fine details of backupsets get
the backupset number from above o/p and give command,
RMAN> list backup
This will show the files on OS where the backup is happened. U can check the existance of those files in filesystem.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 04:14 AM
04-02-2008 04:14 AM
Re: oracle backup
You can use the commands listed above by -Santosh.
e.g.
$ rman catalog=rman/rman target sys/redhat
Recovery Manager: Release 10.2.0.3.0 - Production on Wed Apr 2 16:07:50 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: MYDB (DBID=1116966042)
connected to recovery catalog database
RMAN> list backup;
..
Note that you can also monitor the status of all backups using the Oracle Enterprise manager Database Control.
http://
Maitenance -> High Availability -> Backup/Recovery -> Backup Reports
Remember that if your RMAN has been configured properly and is working, you should perform test restore to make sure that your backup is recoverable.
You may also review your Recoverability window and other parameters.
if you need any further assistance, please let us know
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 10:59 PM
04-02-2008 10:59 PM
Re: oracle backup
thanks for reply
while checking the backup summary,there is no backup date and time when this backup script was executed .this indicates, backup script not works.
when we run rman script manually like
run
{ execute script incr_backup;}
this works fine and display the output of each script commands.
which is not case when we run this on shell prompt like
./incr_backup
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 03:00 AM
04-03-2008 03:00 AM
Re: oracle backup
-----------
set -vx
---------------
Redirect the o/p to some file .
$ ./incr_backup > some_file 2>&1
diagnose the file some_file for possible errors.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 08:58 AM
04-03-2008 08:58 AM
Re: oracle backup
the file mentioned as your msglog has a date and timestamp. Can you confirm that the file was not created that scheduled time?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2008 12:54 AM
04-04-2008 12:54 AM
Re: oracle backup
no file is generated
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2008 01:14 AM
04-04-2008 01:14 AM
Re: oracle backup
This is totally confusing. Do you mean that in spite of the changes made on "Mar 29", the script is still not working?
please clarify.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2008 10:50 PM
04-04-2008 10:50 PM
Re: oracle backup
yes it is created the log file with folowing
contents
R
ecovery Manager: Release 10.2.0.3.0 - Production on Sat Apr 5 12:11:26 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CIEHO (DBID=103616347)
connected to recovery catalog database
regards
shabir