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

Thread: rman

  1. #1
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401

    rman

    need command to delete previous days backup instead of obselete

    i have shell script which takes back up and delete based on obselete.

    source .t45pdbprofile


    echo

    rman target / <
    backup database plus archivelog all delete input;

    delete no prompt obselete;

    eof
    exit


    Can any one help me with a command deleting old backups based on time like sysdate -1 or sysdate -2 instead of saying delete obselete.the backups are on ASM

    Thank you

  2. #2
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    use...

    delete noprompt backup of database compleyed before 'sysdate-no'
    Rgds
    Parag

  3. #3
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401
    one more question ,

    from shell script how do i spool the output log to a directory for rman

    Thank you
    Last edited by prodadmin; 11-19-2008 at 09:04 AM.

  4. #4
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    you can use spool command in rman.

    like if you want to spool o/p in specific dir.

    1) SPOOL LOG TO '/specific_dir/your_log_file';
    2) rman backup commands
    3) spool off;

    Click here
    Rgds
    Parag

  5. #5
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401
    btw delete noprompt backup of database completed before 'sysdate-1' is not deleting backups on standby.

    i take backup of archivelogs only on standby ..

    is there different command i need to use

    Please advise

    Thanks

  6. #6
    Join Date
    Jan 2001
    Posts
    2,828
    Quote Originally Posted by prodadmin
    btw delete noprompt backup of database completed before 'sysdate-1' is not deleting backups on standby.

    Thanks

    You are running this command while connected to the standby database i assume

    BTW a better comman would be something like

    DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO SBT COMPLETED BEFORE ‘SYSDATE-7

    You will be deleting those backups of archivelogs that have been already backed up.You are absolutely sure you have backups of archivelogs

    You might also be interested in setting the following config on standby database

    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE
    This will enable automatic deletion of archived logs
    on the standby database
    (where backups are being taken)
    that are outside of the retention period
    or have already been backed up to tape,
    if additional space is needed for new backups or archived logs

    regards
    Hrishy
    Last edited by hrishy; 11-20-2008 at 04:24 AM.

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