Need Advice on RMAN backup script

Hi;
Can any one advice if any error or guide to make RMAN backup proper :
Backup Policy are:
1.     0 level backup
2.     current log file is arvhived before backing up
3.     backup whole database (datafiles)
4.     backup separate control file
5.     backup is done on disk
6.     control file auto backup ON
7.     only 7 days archive log are need to be preserve ; old need to be deleted
### one time paramters seting
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
### Command for weekly 0 level backup
run {
allocate channel c1 type disk;
sql 'alter system archive log current';
backup incremental level 0 tag = weekly_database format 'o:\rman\backup\full_weekly_%d_%s_%p_%t'(database);
release channel c1;
configure controlfile autobackup format for device type disk to 'o:\rman\backup\auto_ctrl_weekly_%f';
allocate channel c1 type disk;
backup tag = weekly_arch archivelog until time 'sysdate-7' format 'o:\rman\backup\archive_weekly_%d_%s_%p_%t';
delete archivelog until time 'sysdate-7';
release channel c1;
Regards
Smith

Dear Pierre F.;
Actually, I just added in my backup plan to have daily backup through RMAN, instead of COLD backup.
I have planned to take cold backup once a week. here is the side of data:
*** datafile 410
*** size of database : 86 GM
*** relog files size : 250MB
*** daily archive logs are : 250MB * 4(number of files) = 1GM aprox.
yes, time constraint is there; just because of the size of database. and we r going for 24/7
Is this script going to run only one per week ?
Ans: no I this was level 0 backup; i will take level 1 incremental backup with same script daily too.
Do you have any other RMAN script ?
ANS: no, I will modify same script for incremental.
after local copy of backup all backup files (RMAN) will be copy over network to backup server or we can install LTO tape device to copy directly from database server.
kindly advise me I am new in RMAN.
regards;
SMITH

Similar Messages

  • RMAN Backup Script not running in cron tab

    Hi,
    I am having rman backup script which is being executed successfully through shell.
    but when scheduled in cron the script is being called but RMAN commands are not getting executed.
    i have scheduled cron using oracle user.
    Attached below the rman script for taking LEVEL 1 backup
    #! /bin/ksh
    DATE=`date +%Y-%m-%d`
    export ORACLE_SID=ACIDC
    export ORACLE_BASE='/home/app/oracle/product/10.2.0'
    PATH=$PATH:${ORACLE_HOME}/bin
    export PATH
    export ULIMIT=unlimited
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
    export LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    export TNS_ADMIN=$ORACLE_HOME/network/admin
    cd $ORACLE_HOME/bin
    rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log
    backup incremental level 1 database;
    report obsolete;
    delete noprompt obsolete;
    exit;
    EOF
    exit 0
    Attached cron script
    SHELL=/bin/sh
    PATH=:/usr/ucb:/bin:/usr/bin
    10 17 * * 2 /oraclebkp/rmanscripts/rmandclvl1.sh 2>&1 >/oraclebkp/cronlogs/delobs.log
    Files delobs.log
    and oraclebkp/rmanlogs/ACIDC/$DATE.log are being created but with 0 bytes .
    Thanks in Advance
    HariPriya,

    rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log Change this line to and try..
    $ORACLE_HOME/bin/rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log

  • Rman backup script suggestion

    Hi,
    I have script bellow. I want to run in one script on linux as shell script: how can i do that. i have very limited knowledge about it:
    setenv TNS_ADMIN "/location/network/admin"
    setenv ORACLE_HOME "/location/db1"
    setenv TWO_TASK "DB1"
    setenv ORACLE_SID "DB1"
    rman run {
    # Shutdown database for backups and put into MOUNT mode
    shutdown immediate
    startup mount
    # Allocate channel. Important: This must be done after
    # database has been mounted!!!
    allocate channel t1 DEVICE TYPE DISK FORMAT '/backuplocation/DB1RMAN/%U' ;
    # Perform full database backup
    backup Database format '/backuplocation/DB1RMAN/%d_FULL_%U.bck';
    # Open database after backup complete
    sql 'alter database open';
    sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
    release channel t1;
    }

    user12020966 wrote:
    Hi,
    I have script bellow. I want to run in one script on linux as shell script: how can i do that. i have very limited knowledge about it:
    setenv TNS_ADMIN "/location/network/admin"
    setenv ORACLE_HOME "/location/db1"
    setenv TWO_TASK "DB1"
    setenv ORACLE_SID "DB1"
    rman run {
    # Shutdown database for backups and put into MOUNT mode
    shutdown immediate
    startup mountWhy the shutdown? are you running in norachivelog mode?
    # Allocate channel. Important: This must be done after
    # database has been mounted!!!
    allocate channel t1 DEVICE TYPE DISK FORMAT '/backuplocation/DB1RMAN/%U' ;Above not needed if you set it as part of the rman config:
    oracle> rman target /
    rman> CONFIGURE DEFAULT DEVICE TYPE TO DISK FORMAT '/backuplocation/DB1RMAN/%U';
    # Perform full database backup
    backup Database format '/backuplocation/DB1RMAN/%d_FULL_%U.bck';Your use of "format" is redundant with your channel allocation.
    # Open database after backup complete
    sql 'alter database open';
    sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';No need to shell out to sql. those commands are accepted directly by rman.
    RMAN> startup mount;
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area     285212672 bytes
    Fixed Size                     1267068 bytes
    Variable Size                146803332 bytes
    Database Buffers             134217728 bytes
    Redo Buffers                   2924544 bytes
    RMAN> alter database open;
    database opened
    RMAN>
    release channel t1;
    }I'd strongly suggest you go to amazon.com and look up the books on rman backup and recovery by Hart and Freeman. You are making waaay too much work for yourself.

  • Oracle 9i Rman backup script !!

    hi,
    We are taking rman backup level 0. While making this backup the backup size is very big i.e. let's suppose if DB size is some 100GB then backup size would be somewhere around 60-70 GB. I need to know , does anybody having any script which compresses the backup sets after they get generated during the backup i.e. lets suppose 10 backup sets get generated, what I need to know is when RMAN is generating lets say 2 backup can we compress 1st backupset and so on like when 3rd backup set is getting generated we compress the 2nd backupset and so on till 10th backup set.
    Let me know if anybody needs more information on this...I know it's a typical requirement :o))

    hello Hamir,
    what operating system are you working on
    after the backup you could call a routine in unix to gzip file_name
    or in windows to use winzip.
    however in 9i to restore the database you would then need to unzip the files first.
    what possibility do you have to upgrade to 10g, this has the ability to automatically compress the backup set from within RMAN.
    rgds
    alan

  • RMAN Backup script for RAC Database..please suggest

    Hi All,
    I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount
    srvctl status database -d PROD
    echo "Start Full Database Backup on";date
    $ORACLE_HOME/bin/rman target / nocatalog <<EOF
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
    run{
    allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
    allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
    backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
    backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
    copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
    delete noprompt obsolete;
    release channel c1;
    release channel c2;
    exit
    EOF
    echo "RMAN Backup Finished on";date
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    echo "Start Database";date
    srvctl start database -d PROD
    srvctl status database -d PROD
    Please share your experiences.
    Regards

    Hi,
    Some tweaks for your script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
    2. configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
    It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
    - Pavan Kumar N
    3.

  • I need help making a backup script

    I'm trying to create this full system backup script that I plan to run manually. I have some commands to compress and extract my root directory and everything in it, but they're not complete because there are a few other features I would like to have. The problem is that I have no idea how to implement these specific features, and my googling of bash scripting documentation only left me confused and at square 1. This is what I have so far (just commands I can run in the terminal):
    To compress:
    sudo tar -cpf ~/archive.tar.gz / --exclude=/proc
    To extract & restore:
    sudo tar -xpf /home/agi/archive.tar.gz -C /
    I want this script to:
    1. allows me to run as
    sh ~/.bin/backup.sh [directory to back up]
    What I mean is there should be some sort of parameter in the script so that when I run it, I can choose whatever directory I want to compress rather than just be limited to just /.
    2. puts finished .tar.gz in my home directory (I plan to transfer the archive to external media or online later; this gives me the freedom to not need to have a specific drive connected to run the script). I already have this in the commands, but I just wanted to point out that this is important.
    3. names finished .tar.gz DD-MM-YY-backup.tar.gz where DD is day, MM is month, YY is year.
    4. the "sudo" part works correctly. That is, the script, when run, asks for a password and can be granted root permissions (or is granted root permissions in some other way) so that I can back up all parts of my system without these sorts of errors.
    5. shows some sort of progress indicator. Either a progress bar, shows the tar program output, or something that gives me an indication that the script is working and perhaps how long it will take. This one is really optional, for as long as the process is working properly then I'm ok. But if it is possible and not ridiculously complicated or difficult, it would be very nice.

    What I mean is there should be some sort of parameter in the script so that when I run it, I can choose whatever directory I want to compress rather than just be limited to just /.
    On my backup script, I specify $* which should accept any arguments passed to the script.. ex: $ ./backup.sh /source/folder /source/folder2.
    in the script:
    #!/bin/sh
    tar -cpf $HOME/$(date +%d%m%Y)-backup.tar.gz $* --exclude=/proc
    2. puts finished .tar.gz in my home directory (I plan to transfer the archive to external media or online later; this gives me the freedom to not need to have a specific drive connected to run the script). I already have this in the commands, but I just wanted to point out that this is important.
    In the above script, that is what the ~ or $HOME should do..
    3. names finished .tar.gz DD-MM-YY-backup.tar.gz where DD is day, MM is month, YY is year.
    Same thing, the above script should do the trick, you might want to modify the date parameters (check the date manual)
    4. the "sudo" part works correctly. That is, the script, when run, asks for a password and can be granted root permissions (or is granted root permissions in some other way) so that I can back up all parts of my system without these sorts of errors.
    You could put something to prevent the script from running unless you are root, or you could have it prompt for a password and use sudo within the script. I would recommend the first. Here is a code snippet:
    #Check for root
    if [ $(whoami) != "root" ]; then
    echo "Error: You cannot perform this operation unless you are root"
    exit 1
    fi
    5. shows some sort of progress indicator. Either a progress bar, shows the tar program output, or something that gives me an indication that the script is working and perhaps how long it will take. This one is really optional, for as long as the process is working properly then I'm ok. But if it is possible and not ridiculously complicated or difficult, it would be very nice.
    You might be able to use a similar program to tar, but with progress. Maybe someone else could shed some light here..
    Hope this helps...

  • RMAN Backup Script Error

    Hi ,
    I am getting the following error when i am executing manbackup shell script.
    Message file RMAN<lang>.msb not found
    Verify that ORACLE_HOME is set properly
    RMAN Script
    DATE=`date +%Y%m%d.%H%M`
    #su - oracle
    #<<EOF
    export ORACLE_HOME=/home/app/oracle/product/10.2.0/db_1
    echo $ORACLE_HOME
    export PATH=$PATH:$ORACLE_HOME/bin
    #export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=ACILOC
    echo $ORACLE_SID
    rman cmdfile=/oraclebkp/rmanbackupscripts/rmanlevel0bkp.bck log=/oraclebkp/rmanbackupscripts/rmanACILOClev0$DATE.log
    export ORACLE_SID=ACIDC
    echo $ORACLE_SID
    rman cmdfile=/oraclebkp/rmanbackupscripts/rmanlevel0bkp.bck log=/oraclebkp/rmanbackupscripts/rmanACIDClev0$DATE.log
    #EOF
    level0bkp.bck
    connect target `/'
    run
    backup incremental level 0 database;
    but I am able to take RMAN backups by connecting as RMAN TARGET /
    Thanks in advance
    Priya

    connect target `/'Dont give / in quotations just connect as
    connect target /
    backup incremental level 0 database;
    }Thanks
    Close the threads as answered if helpful/correct.
    user11342455
    Handle: user11342455
    Status Level: Newbie
    Registered: Feb 18, 2010
    Total Posts: 22
    Total Questions:  10 (8 unresolved)
    Edited by: CKPT on Jan 5, 2011 12:17 PM

  • Need inputs on RMAN Backup n Recovery for multiple restore of clean backup

    I will explain my scenario below:
    We have the requirement of performance testing of our proposed production platform, for this i am asked to take RMAN backup of clean position (Say Day0 or baseline backup) and restore it multiple times for few rounds of testing. My question is after 1st restore (with set until time of day0 position) if i open the database with resetlogs, would i be able to restore same clean backup again? I am using control file in the environment instead of RMAN catalog database. What i can do to make this scenario work? I am already in preperation of setting rman catalog database.
    Please suggest me the best way forward...
    Many Thanks
    Nukesh

    Hi Asif,
    I tried to make it work but seems there are still issue with my recovery, can you have a look and point out the shortcommings. i am totally lost here
    RMAN> list incarnation;
    using target database control file instead of recovery catalog
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 MYTEST 2433328848 PARENT 1 19-DEC-06
    2 2 MYTEST 2433328848 PARENT 564488 04-NOV-10
    3 3 MYTEST 2433328848 CURRENT 693719 06-NOV-10
    RMAN> exit
    TEST1DB-> rman target sys@MYTEST1
    Recovery Manager: Release 10.2.0.3.0 - Production on Sun Nov 7 11:43:01 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    target database Password:
    connected to target database: MYTEST (DBID=2433328848, not open)
    RMAN> reset database to incarnation 2;
    using target database control file instead of recovery catalog
    database reset to incarnation 2
    RMAN> run {
    2> restore database until scn 10000;
    3> recover database until scn 10000;
    4> alter database open resetlogs;
    5> };
    Starting restore at 07-NOV-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=191 instance=MYTEST1 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=190 instance=MYTEST1 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/07/2010 11:45:18
    RMAN-20208: UNTIL CHANGE is before RESETLOGS change
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, c onnect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, l ibrary, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rm an, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, va lidate"
    RMAN-01007: at line 0 column 2 file: standard input
    RMAN>
    RMAN> show all;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbackup/MYTEST/ora_cf%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackup/MYTEST/ora_df%t_s%s_s%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10g/dbs/snapcf_MYTEST1.f'; # default
    RMAN> exit
    SQL> select name from v$database;
    NAME
    MYTEST
    SQL> show parameter CONTROL_FILE_RECORD_KEEP_TIME
    NAME TYPE VALUE
    control_file_record_keep_time integer 7
    SQL>

  • Need to Configure RMAN backup in 8.1.7.4.1

    I have been asked to design a backup and recovery strategy for our production and test databases
    I got 2003 Enterprise server with 3 disks of each 300gb.
    There are 10 databases running in versions 8,9,10 with 5 production and 5 UAT database.
    The sum of the Db will be around 70Gb
    I got 200Gb free space in 2 disks
    how can i design a BACKUP startegy here. I have palnned to use RMAN backups.
    Any useful links and proper guiding from you people expected.
    Right Now there is only export backup in Night.
    I have informed them we are running the Db in risk,.They have asked me to comeup with a plan.
    Any help please
    Message was edited by:
    Maran.E

    Maran,
    >
    Is it possible to backup 8.1.7.4.1 by 10g database.
    i can create a recovery catalog in 10g and wil i be able to backup a 8 and 9 Db
    >
    I have test 10g catalog with 9i. No idea with the 8i.
    I guess, 8i(817) is more comportable with 10g and it should work.
    Have a try with your test database and also cross check the metrix with different version in the Metalink.
    Jaffar
    Good news Maran,
    I just come across of the following note which explains the RMAN compatibility between 8 - 10g versions.
    RMAN Compatibility Oracle8i 8.1.7.4 - Oracle10g 10.1.0.4
    Doc ID: Note:307022.1
    In case, if you dont have access to metalink, the punch line from the note is :
    SUMMARY
    =======
    Is best practice to use 'rule of thumb'. Always used the target database RMAN executable and the latest release of Oracle for your recovery catalog.
    If you are going to use a lower version RMAN executable to backup higher version databases remember you are restricted to only the features available
    in the database your using. But the executable you are using must be able to handle the feature or configuration you are using. Case and point the
    RMAN-06466 error above where in 9.0.1 there is no concept of "AS BACKUPSET".
    Because configure commands were executed some options in the controlfile were not understood when parsed by the lower version RMAN.
    Message was edited by:
    Syed Jaffar

  • RMAN backup Scripts: Please Check and Advice

    Dear All
    We are now upgrading our database from 9iR2 to 10gR2.
    Before this process we want a full database backup with RMAN with the following scrips. I also included our current database configuration.
    So, dear all gurus please check this process if any thing goes wrong and give some valuable advice for better performance and other issue.
    ===========================================================
    /data01          400GB
    /data02      400GB
    /data03          400GB
    /idx04          400GB
    Current Tablespace Used Size= 1700GB
    Total Tablespace=31
    Total File=295
    Max File Size= 15GB
    Avg File Size= 9GB
    CPU_COUNT=4
    Memory=32GB
    sqlplus /nolog
    conn /as sysdba
    --configured database in archivelog mode.  Then
    create user rman identified by pass default tablespace INDX tempprary tablespace temp;grant connect,resource,RECOVERY_CATALOG_OWNER to RMAN;
    RMAN target rman/rman@dwh nocatalog
    RMAN>configure channel device type disk maxpiecesize=64GB;
    RMAN>configure channel device type disk maxsetsize=195GB;
    RMAN>configure channel device type disk parallelism=4;
    RMAN>run { 
    allocate channel Channel1 type disk format '/data01/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel2 type disk format '/data02/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel3 type disk format '/data03/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel4 type disk format '/idx01/oracle/rman_backup/DWH_df_%s_%p_%c' ;
    backup as compressed backupset database plus archivelog;
    backup current controlfile format '/idx01/oracle/rman_backup/DWH_cf_%U.f';
    backup spfiel format '/idx01/oracle/rman_backup/DWH_spf_%U.f';
    release channel Channel1;
    release channel Channel2;
    release channel Channel3;
    release channel Channel4;
    ===========================================================
    Thanks & Regards
    Quazi Abdur Rab

    Try this ...
    RUN {
    RECOVER COPY OF DATABASE WITH TAG 'incr_backup' UNTIL TIME 'SYSDATE - 7';
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_backup' DATABASE;
    The RECOVER COPY... line will not do anything until the script has been running for more than 7 days. The BACKUP INCREMENTAL line will perform a complete backup (level 0) the first day it is run, with all subsequent backups being level 1 incremental backups. After 7 days, the RECOVER COPY... line will start to take effect, merging all incremental backups older than 7 days into the level 0 backup, effectively moving the level 0 backup forward. The effect of this is that you will permanently have a 7 day recovery window with a 7 day old level 0 backup and 6 level 1 incremental backups. Notice that the tag must be used to identify which incremental backups apply to which image copies

  • RMAN Backup Script Help

    Hi,
    We currently have an RMAN script that runs nightly to backup the database, including the archivelogs and purge. We are using flashback and would like to keep the archivelog available for 3 days.
    I changed this:
    backup check logical as compressed backupset archivelog all format '${RMAN_DIR}/%d_ARC_%Y%M%D_%s_%p'
    delete input;
    To this:
    backup check logical as compressed backupset archivelog until time 'sysdate-3' format '${RMAN_DIR}/%d_ARC_%Y%M%D_%s_%p'
    delete input;
    I changed "all" to "until time 'sysdate-3'" and want to confirm this before I do anything. Thanks.

    Kamran's video would clear you everything.
    I just want to add few quick steps from my side.
    Step1.Make sure RMAN is connected to the right target database and the recovery catalog.
    Then run the CREATE SCRIPT command, as shown in this example:
    CREATE SCRIPT full_bkup
    allocate channel ch1 type disk format '/backups/rman/%n%M%D%Y%s%U.bak' maxpiecesize 4G;
    sql 'alter system archive log current';
    sql 'alter system switch logfile';
    backup incremental level 0 tag=rman_10 filesperset=5 database include current controlfile;
    sql 'alter system archive log current';
    sql 'alter system switch logfile';
    release channel ch1;
    Step2.Create a shell script rman_bkup_10g.ksh as below and initiate execution of the above script from this shell script.
    rman target sys/sys-pwd@tgt-db-conn-str catalog rman/rman-pwd@rec-cat-conn-str
    run {execute script *full_bkup*;}
    exit
    Step3.Schedule the shell script rman_bkup_10g.ksh in crontab as below(The example shows,the shell script gets executed everyday at 05:30)
    30 05 * * * /path/to/script/rman_bkup_10g.ksh >> /path/to/log/rmanbkup.log
    You may please tailor the scripts as per your need.
    Edited by: bharathDBA on Aug 8, 2011 3:27 AM
    Edited by: bharathDBA on Aug 8, 2011 3:52 AM
    Edited by: bharathDBA on Aug 8, 2011 3:54 AM

  • Rman backup scripts

    Hi, I am inquiring as to how to create a job to run an rman script without using the Enterprise manager to schedule and create the job.
    Thanks
    James

    You are going to want to at least set the following RMAN parameters. You may need to set other depending on your environment.
    RETENTION POLICY
    CONTROLFILE AUTOBACKUP ON
    CONTROLFILE AUTOBACKUP FORMAT
    PARALLELISM
    CHANEL DEVICE TYP FORMAT
    SNAPSHOT CONTROLFILE NAME
    Below is an example of how I have these set on a test system. This from a 10g database
    RMAN> show all;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/ecmtst/%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/ecmtst/%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/ecmtst/snapcf_ecmtst1.f';
    RMAN>

  • Need advice on UPS backup

    I am looking to buy a UPS backup. I am not sure how many joules I should be looking for and what would be overkill.
    I have a G5 tower, VCR, Monitor, NTSC monitor, printer, speakers and also plug in my camera(s) frequently.
    Any advice would be greatly appreciated.
    Thanks!
    Steve

    There is an APC UPS selector here
    http://apc.com/tools/ups_selector/index.cfm
    which will give you an idea of the size you need in VA. Then you can look around for makes and models to suit.
    It doesn't exactly align obviously with the G5 models, so I just select the biggest.
    I have a 1000VA (230volt) APC Smart-UPS for the set-up below.
    The Smart-UPS has a sine-wave output which is said to be better for computers.
    Laser printers should not be connected to the UPS for battery back-up, because of their high load.
    There is some technical discussion of UPS for G5 if you search on "UPS" in the box at top right.
    Post again if you have any queries.
    G5 DP2(A) 4GB; HD160+300; DVR-110D; 9800proSE(VeraxG03); 20"ACD; EyeTV-DTT; f/w800 200GB; iSight; iSkint
    OS X 10.4.5

  • Generate RMAN backup Script using unix shell script

    Hello,
    Could somebody give me a unix shell script that would generate RMAN script based on some user defined parameters in a config file.
    e.g.
    rman.conf
    CHANNELS=4
    USE_CATALOG=Y
    DEVICE='sbt_tabe'
    etc.,
    many thanks,
    kam

    You can actually encapsulate the RMAN commands inside the shell script.
    However if you really want to create a seperate RMAN script file, you can use the unix shell's "echo" command to write set variables to a file.
    Thus, for example,
    echo "rman target / catalog rman/rmanpassword@crcat" > RMAN_Script.rmn
    echo "backup database plus archivelog" >> RMAN_Script.rmn
    echo "backup archivelog all" >> RMAN_Script.rmn
    creates RMAN_Script.rmn with 3 commands.

  • RMAN backup script

    OS windows 2000 server
    database 9i
    I am planning following script for backup of database.
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    release channel ch1;
    Want to overwrite the backup on every sunday on disk.
    1.What changes should I make in script so that RMAN should not create new file
    and overwrite older one.

    Thanks.
    Now I can schedule backup job through above script.
    With this script
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    release channel ch1;
    and CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    I want to delete obsolete backup
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    delete obsolete;
    release channel ch1;
    It is not working as delete obsolete command asks for confirmation (YES/NO)?
    How to do it ?

Maybe you are looking for