DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Linux Backup Script

  1. #1
    Join Date
    Oct 2007
    Posts
    114

    Linux Backup Script

    Hi All,

    Can you share me your RMAN BACKUP script for RHEL pls.
    I need to backup my new Linux PROD Oracle 10g database.
    And I misplaced my notes :(



    Thanks a lot

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    well what have you come up with so far from the thousands of rman examples on the web

  3. #3
    Join Date
    Oct 2007
    Posts
    114
    Hi David,

    I got this script but its from 8.1.7 version

    Are the commands still valid in 10g? or deprecated

    ===============
    c:\ rman target / nocatalog


    run {
    allocate channel c1 type disk format 'h:\rman_backup\dfcon_%d_%u_%s_%p';
    backup
    incremental level 0
    tag "Full hot backup"
    (database include current controlfile);

    backup current controlfile tag='current';
    release channel c1;

    allocate channel c1 type disk format 'h:\rman_backup\arch_%d_%u_%s_%p';
    change archivelog all validate;

    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';

    backup archivelog all;

    sql "alter database backup controlfile to ''h:\rman_backup\cf01.
    last''";
    release channel c1;
    }

    ============

    How do I put it in bat batch file ? e.g backup.bat or backup.sh


    Thanks a lot

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by reeshe
    How do I put it in bat batch file ? e.g backup.bat or backup.sh
    Ever heard about copy/paste?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Oct 2007
    Posts
    114
    It wont run as is dear it need parameter to be passed

    thanks

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    yet you provide no error, or any information

  7. #7
    Join Date
    Oct 2007
    Posts
    114
    I remember I have a notes before but it was lost

    Its something like this:
    I remember i have 2 or 3 files

    1st file: rman1.exe > inside it is > rman target / nocatalog file=param.file
    2nd file: param.file > inside it is> run {backup database} ... etc
    3rd file: I'm not sure if it was cleaning up obsolete files

    Can you just lend me your scripts instead

    Thanks a lot
    Last edited by reeshe; 05-14-2008 at 07:39 AM.

  8. #8
    Join Date
    Oct 2007
    Posts
    114
    By the way...what the difference between :

    sql> alter system switch logfile;

    and

    sql> ALTER SYSTEM ARCHIVE LOG CURRENT;


    Thanks a lot

  9. #9
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    none in real terms

  10. #10
    Join Date
    Oct 2007
    Posts
    114
    thanks

    If i have 4 online redo, and i want to force archive log all contents of them 4, so that I can
    backup the latest changes in the database into the tape drive or any external drives...
    Do I have to issue
    'ALTER SYSTEM SWITCH LOGFILE' four times (4x) or
    'ALTER SYSTEM ARCHIVE LOG CURRENT' four times


    thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width