DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Need help on RMAN online backup setup

  1. #1
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    Hi,

    We have a small 3-4 Gigs database which needs to be backed up online everyday.

    We are planning to do a whole backup every night using the following script

    replace script whole_backup {
    allocate channel ch1 type disk format 'd:\Backup\backupset\%d_backups%U';
    set limit channel ch1 kbytes=819200;
    backup database ;
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    backup archivelog all delete input;
    }

    Please suggest what other things I need to backup to ensure a good backup is taken daily. I mean is doing this enough.

    Also is there a way that instead of deleting all the archive logs I delete the ones that are 2 days or older.

    Thanks
    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

  2. #2
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Here is the script we use to do complete backups:

    {
    backup database
    include current controlfile
    format 'df_%d_%s_%p';
    sql 'alter system archive log current';
    backup archivelog all format 'al_%d_%s_%p'
    delete input;
    }

    The one thing I see that you are missing is to "include current controlfile".

    If you don't want to delete the archive logs, just remove the "delete input" part. Then run another script to delete those over 2 days old. (Since you are doing this everyday, no archive logs being backed up will be 2 days old anyway).

    Hope that helps!
    Jodie

  3. #3
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    You also need to backup your init parameters file after you change it.

    for the last quetion, the following script might be helpful:

    CONFIGURE BACK OPTIMAZITION ON;
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
    BACKUP ARCHIVELOG UNTIL TIME 'SYSDATE-2' DELETE ALL INPUT;
    BACKUP ARCHIVELOG SINCE TIME 'SYSDATE-1';
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  4. #4
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    Originally posted by jodie
    Here is the script we use to do complete backups:

    {
    backup database
    include current controlfile
    format 'df_%d_%s_%p';
    sql 'alter system archive log current';
    backup archivelog all format 'al_%d_%s_%p'
    delete input;
    }

    The one thing I see that you are missing is to "include current controlfile".

    If you don't want to delete the archive logs, just remove the "delete input" part. Then run another script to delete those over 2 days old. (Since you are doing this everyday, no archive logs being backed up will be 2 days old anyway).

    Hope that helps!
    Jodie
    Thanks Jodie,

    What does "include current controlfile " do. Isnt the control file backed up by default in case of RMAN backups.

    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

  5. #5
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    Actually I am looking for a way where I can automate the backups.

    This is what i want to do every day.

    1. Take whole database backups on disk including init.ora and password files
    2. These backups will be copied on to a Tape leaving the disk copy intact. (This is done by a backup schedule installed by the system admin. i have no control over it)
    3. The next day again the backups will be taken on the disk but before that I want to delete the prior days backup from the disk.

    After n number of days I want to delete some old backups from RMAN .

    Is there a automated script which does this.

    Thanks
    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

  6. #6
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587

    What does "include current controlfile " do. Isnt the control file backed up by default in case of RMAN backups.


    Yes it is ,but since it's not self informative, meaning it won't have info of the bkup which included it, you'll need a backup of ctl file seperately.
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  7. #7
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    Originally posted by Tarry

    What does "include current controlfile " do. Isnt the control file backed up by default in case of RMAN backups.


    Yes it is ,but since it's not self informative, meaning it won't have info of the bkup which included it, you'll need a backup of ctl file seperately.
    Tarry,

    I am a little confused about this.

    You mean to say that RMAN will back up the control file and wont have any Info on it.
    If thats the case how will it restore it.

    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

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