Help needed on RMAN backup/recovery

Hi All,
I planning to implement the following backup strategy..
Online hotbackup is taking using RMAN without Recovery Catalog, Instead using controlfile autobackup to the repository. We the following backup schedules
1. Weekly full backup of database.
2. Daily Incremental backup with archive logs
And the backupset files created by the above schedule are stored in tape.
My Assumption:
As we are using control file autobackup, whenever i take full/incremental backup. the backup information will be stored in control file and the control files/spfile also will be backed up.
I did the following:
1. I have taken full backup(incr level=0) of database in the morning.
2. After taking the full backup, i did some transactions in one of the table.
3. Again, i have taken the incremental backup of the database.
4. All the backup pieces are stored in a tape.
My Doubt:
1. Now, controlfile will have information of full backup and incremental backup right?
2. If i restore the database in a new machine with these backups, both full backup files and incremental backup files are considered?
Thanks,
Praveen.

To answer your questions:
1. Now, controlfile will have information of full backup and incremental backup right?Yes.
2. If i restore the database in a new machine with these backups, both full backup files and incremental backup files are considered?YES.
HTH
Thanks
Chandra

Similar Messages

  • What are the steps in RMAN Backup & Recovery 10 G

    Hi All
    Please list out What are the steps in RMAN Backup & Recovery 10 G
    Regards

    Take a look at the user guide or at the getting started section, dba core tasks - backup and recovery.
    C.

  • Need help in the RMAN backup

    Hi everybody
    What are the steps needed if move the RMAN backup to other location in the OS level
    (ie) every week i have to move the backup to other location

    There are not problem for example:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\comp>set ORACLE_SID=W
    C:\Documents and Settings\comp>sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.2.0 - Production on Mon Apr 26 14:53:08 2010
    Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name:
    C:\Documents and Settings\comp>sqlplus "sys/sm as sysdba"
    SQL*Plus: Release 10.2.0.2.0 - Production on Mon Apr 26 14:53:15 2010
    Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> archive log list;
    Database log mode No Archive Mode
    Automatic archival Disabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 12
    Current log sequence 14
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 125829120 bytes
    Fixed Size 1288100 bytes
    Variable Size 71305308 bytes
    Database Buffers 46137344 bytes
    Redo Buffers 7098368 bytes
    Database mounted.
    SQL> alter database archivelog;
    Database altered.
    SQL> alter databaseop;
    alter databaseop
    ERROR at line 1:
    ORA-00940: invalid ALTER command
    SQL> alter database open;
    Database altered.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    C:\Documents and Settings\comp>rman target sys/sm
    Recovery Manager: Release 10.2.0.2.0 - Production on Mon Apr 26 14:55:58 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: W (DBID=754336873)
    RMAN> backup database;
    Starting backup at 26-APR-10
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=144 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00001 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSTEM01.DBF
    input datafile fno=00003 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSAUX01.DBF
    input datafile fno=00005 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\EXAMPLE01.DBF
    input datafile fno=00002 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\UNDOTBS01.DBF
    input datafile fno=00004 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 26-APR-10
    channel ORA_DISK_1: finished piece 1 at 26-APR-10
    piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\2010_04_26
    \O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP tag=TAG20100426T145611 comment=NON
    E
    channel ORA_DISK_1: backup set complete, elapsed time: 00:01:34
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel ORA_DISK_1: starting piece 1 at 26-APR-10
    channel ORA_DISK_1: finished piece 1 at 26-APR-10
    piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\2010_04_26
    \O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP tag=TAG20100426T145611 comment=NON
    E
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
    Finished backup at 26-APR-10
    RMAN> crossckeck backupset;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "allocate, alter
    , backup, beginline, blockrecover, catalog, change, connect, copy, convert, crea
    te, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flas
    hback, host, {, library, list, mount, open, print, quit, recover, register, rele
    ase, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, s
    et, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport
    , upgrade, unregister, validate"
    RMAN-01008: the bad identifier was: crossckeck
    RMAN-01007: at line 1 column 1 file: standard input
    RMAN> crosscheck backupset;
    using channel ORA_DISK_1
    crosschecked backup piece: found to be 'EXPIRED'
    backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
    0_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP recid=1 stamp=717346573
    crosschecked backup piece: found to be 'EXPIRED'
    backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
    0_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP recid=2 stamp=717346669
    Crosschecked 2 objects
    RMAN> delete expired backupset
    2> ;
    using channel ORA_DISK_1
    List of Backup Pieces
    BP Key BS Key Pc# Cp# Status Device Type Piece Name
    1 1 1 1 EXPIRED DISK D:\ORACLE\PRODUCT\10.2.0\FLASH_R
    ECOVERY_AREA\W\BACKUPSET\2010_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
    2 2 1 1 EXPIRED DISK D:\ORACLE\PRODUCT\10.2.0\FLASH_R
    ECOVERY_AREA\W\BACKUPSET\2010_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
    Do you really want to delete the above objects (enter YES or NO)? y
    deleted backup piece
    backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
    0_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP recid=1 stamp=717346573
    deleted backup piece
    backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
    0_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP recid=2 stamp=717346669
    Deleted 2 EXPIRED objects
    now i copy all backup to c:\db
    then
    RMAN> catalog start with 'c:\db';
    searching for all files that match the pattern c:\db
    List of Files Unknown to the Database
    =====================================
    File Name: C:\db\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
    File Name: C:\db\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
    Do you really want to catalog the above files (enter YES or NO)? y
    cataloging files...
    cataloging done
    List of Cataloged Files
    =======================
    File Name: C:\db\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
    File Name: C:\db\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
    RMAN> list backupset;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    1 Full 592.76M DISK 00:01:26 26-APR-10
    BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20100426T145611
    Piece Name: C:\DB\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
    List of Datafiles in backup set 1
    File LV Type Ckp SCN Ckp Time Name
    1 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSTEM01.
    DBF
    2 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\UNDOTBS01
    .DBF
    3 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSAUX01.
    DBF
    4 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\USERS01.D
    BF
    5 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\EXAMPLE01
    .DBF
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    2 Full 6.80M DISK 00:00:04 26-APR-10
    BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20100426T145611
    Piece Name: C:\DB\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
    Control File Included: Ckp SCN: 947720 Ckp time: 26-APR-10
    SPFILE Included: Modification time: 26-APR-10
    RMAN>

  • Help needed with rman script

    Hi guys,
    I need you help in creating rman scripts.
    my plan is the following:
    - at night i would like to make a backup of the database, archivelogs, control file and spfile. then delete the archivelogs on disk.
    - during the day i would like to make every hour, a backup level 1, archivelogs and crontrol file.
    my questions are:
    for the night backup is the following script ok?
    run {
    set command id to 'xxx';
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    BACKUP INCREMENTAL LEVEL 0 DATABASE;
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    change archivelog all;
    backup archivelog all delete input;
    backup current controlfile;
    BACKUP SPFILE;
    release channel t1;
    release channel t2;
    and for the daily backup (run on every hour) what do you think about this? is it ok?
    run {
    set command id to 'xxx';
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type 'SBT_TAPE';
    BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    backup archivelog all not backed up 1 times;
    backup current controlfile;
    release channel t1;
    release channel t2;
    please help.
    Message was edited.

    Hi Alanm,
    Right now the DB is generating many archives, that doesn't mean that we cant adapt the script in the future if less archives are generated.
    By saying "You don't have to make the archive log script an incremental 1 backup" you mean that, since we are already making a backup at night to the archives, theres no need to make them also during the incremental 1?
    and for the rest, do you thing the script is ok?

  • RAC RMAN BACKUP Recovery FOR  Oracle APPS Application

    Hi,
    We have an Application which is similar to Oracle APPs application and We have a RAC Database at Backend.
    As I am a Oracle RAC DBA and never worked as an Oracle apps DBA.
    Each Week or month We have to deploy a patch on Our Database which are kind of sql changes to Database and before we applying we need to backup our Database.
    I am very comfortable while applying patches on Single instance Database:-
    I Usually shutdown my database and backing up My Database(Conistent\cold Backup) before applying patch.
    and I have a Flash back on both option I am having for my Database.
    Problem:-
    But in Production I have RAC Database, on which I already configured Hot Backup.
    FlashBackup Feature is there with me, but Not reliable.
    I want cold backup along with my existing hot backup, and want to restore same if something goes wrong.
    Since ASM is configured so we have only option RMAN backup.
    IF possible kindly Share your knowledge and Experience of your to handle Such Problem.

    Sir,
    RMAN is already configured for backing up database online.
    My only intention is to have cold or consistent backup before applying application patch, So that at the time of crisis I will resotre my Cold/Conistent backup.
    Because I am using 11gr2 RAC with ASM, so only option is there for me to use rman as backup tool.
    But I never tried to Have Cold backup in RAC environment in my previous jobs, and I am new to this Oracle APPS DBA technology. So Here I am looking for a Strategy that Normally oracle apps dba use while applying patch to Oracle Database and kind of backup strategy they use.
    Regards
    Gaurav

  • Please help!! Newbie here really need help. Numlock, divers, backup, recovery disk

    Hi everyone
    I finally found where to post
    I really wish someone could or would help me
    I have a lenovo g550 for about 4-5 years And I was happy with it
    few days go I cleaned installed windows Ii got a friend to help infests he put it on the d drive then c drive And c drive gainsaid he formatted my d drive chlorinating on therein was a real unswayable I kind of sorted it out. And I learnt a lot bout the oem partitioning deleted that though. Can someone tell me If I can boot or recover my previous vista from there.?
    If not its fine but then I would like to know is can I change the oem partition with the image or recovery (whatever you call it) of the new windows  7 or how to go about creating a recovery disk.
    After installing the new windows my PC seems to be fine but I don't know If I kept all the drivers And whatever goes with it. What are all the drivers I need And where do I find If I have them or not. I am not really worried about my data as I want to start fresh.
    Another thing I noticed is my number keypad stopped working all of a sudden. When I press the numlock button it beeps and the light does go on and off. When its on it doesn't give me numbers e.g... If I press 5 it actually highlights where the cursor is.
    And my mouse/trackpad is not the same as it was before. When I had vista on the right of the trackpad I could use it to scroll up and down and the bottom of the trackpad allowed me to scroll left to right. This function is no longer there. I have to use the arrows to go up and down.
    Somebody please help as I do need my laptop for work purposes.
    THANK YOU IN ADVANCE!!!

    hi any drivers you should need you should be able to get through support drivers&downloads link at top of this sites page bud you could use partition magic to clear all partitions and create new multible one if you wish the rest wait till after you put drivers in and see if probs still exist bud

  • Help on failing RMAN backup please.

    I have setup a nightly backup with the following script.
    run {
    allocate channel oem_backup_disk1 type disk format 'd:\mad3_nightly_backups\%U';
    backup incremental level 1 cumulative as BACKUPSET tag 'MAD3_CUMULATIVE_BA_040506080003' database include current controlfile;
    recover copy of database;
    backup as BACKUPSET tag 'MAD3_CUMULATIVE_BA_040506080003' archivelog all not backed up delete all input;
    report obsolete;
    crosscheck backup;
    crosscheck copy;
    report need backup;
    report unrecoverable;
    release channel oem_backup_disk1;
    But everytime I try to run this via OEM's nightly backup shedule, I get the error in the log below. But not able to identify what is causing the problem.
    My database is currently about 300GB.
    DB_RECOVERY_FILE_DEST_SIZE = 2GB
    FLASHBACK_ON = NO
    Shoud I try and increase the DB_RECOVERY_FILE_DEST_SIZE? If so to what? I would appriciate any help guys. Thanks.
    channel oem_backup_disk1: starting incremental level 1 datafile backupset
    channel oem_backup_disk1: specifying datafile(s) in backupset
    input datafile fno=00005 name=+MAD3ASM/mad3/datafile/madattrib.277.586366645
    .......SNIPED
    input datafile fno=00025 name=+MAD3ASM/mad3/datafile/mmdatalive.419.586257801
    input datafile fno=00027 name=+MAD3ASM/mad3/datafile/mmattrindexlive.421.586258381
    input datafile fno=00028 name=+MAD3ASM/mad3/datafile/mmattrindexlive.422.586258471
    input datafile fno=00026 name=+MAD3ASM/mad3/datafile/mmspindexlive.420.586258363
    input datafile fno=00029 name=+MAD3ASM/mad3/datafile/mmdataarchive.423.586258563
    input datafile fno=00030 name=+MAD3ASM/mad3/datafile/mmspindexarchive.424.586258581
    input datafile fno=00031 name=+MAD3ASM/mad3/datafile/mmattrindexarchive.425.586258599
    input datafile fno=00001 name=+MAD3ASM/mad3/datafile/system.256.583260945
    input datafile fno=00003 name=+MAD3ASM/mad3/datafile/sysaux.257.583260945
    input datafile fno=00002 name=+MAD3ASM/mad3/datafile/undotbs1.258.583260945
    input datafile fno=00004 name=+MAD3ASM/mad3/datafile/users.259.583260947
    channel oem_backup_disk1: starting piece 1 at 05-APR-06
    channel oem_backup_disk1: finished piece 1 at 05-APR-06
    piece handle=D:\MAD3_NIGHTLY_BACKUPS\3SHFPDMM_1_1 tag=MAD3_CUMULATIVE_BA_040506080003 comment=NONE
    channel oem_backup_disk1: backup set complete, elapsed time: 01:33:55
    channel oem_backup_disk1: starting incremental level 1 datafile backupset
    channel oem_backup_disk1: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel oem_backup_disk1: starting piece 1 at 05-APR-06
    channel oem_backup_disk1: finished piece 1 at 05-APR-06
    piece handle=D:\MAD3_NIGHTLY_BACKUPS\3THFPJ6P_1_1 tag=MAD3_CUMULATIVE_BA_040506080003 comment=NONE
    channel oem_backup_disk1: backup set complete, elapsed time: 00:00:04
    Finished backup at 05-APR-06
    Starting recover at 05-APR-06
    no copy of datafile 6 found to recover
    no copy of datafile 7 found to recover
    ....SNIPED (from 8 to 29)
    no copy of datafile 30 found to recover
    no copy of datafile 31 found to recover
    channel oem_backup_disk1: starting incremental datafile backupset restore
    channel oem_backup_disk1: specifying datafile copies to recover
    recovering datafile copy fno=00001 name=+MAD3ASM/mad3/datafile/system.392.586209619
    recovering datafile copy fno=00002 name=+MAD3ASM/mad3/datafile/undotbs1.395.586209667
    recovering datafile copy fno=00003 name=+MAD3ASM/mad3/datafile/sysaux.391.586209645
    recovering datafile copy fno=00004 name=+MAD3ASM/mad3/datafile/users.396.586209669
    recovering datafile copy fno=00005 name=+MAD3ASM/mad3/datafile/madattrib.768.586383235
    channel oem_backup_disk1: reading from backup piece D:\MAD3_NIGHTLY_BACKUPS\3SHFPDMM_1_1
    released channel: oem_backup_disk1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/05/2006 21:34:30
    ORA-19870: error reading backup piece D:\MAD3_NIGHTLY_BACKUPS\3SHFPDMM_1_1
    ORA-19809: limit exceeded for recovery files
    ORA-19804: cannot reclaim 13904117760 bytes disk space from 2147483648 limit
    exit;
    Recovery Manager complete.

    Take a look at this metalink note: 305812.1
    Flash Recovery area - Space management Warning & Alerts: https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=305812.1
    SELECT object_type, message_type, message_level, reason, suggested_action
    FROM dba_outstanding_alerts;
    The following actions can be done to resolve the space issue :
    - Add disk space to the Flash Recovery Area.
    - Back up your files to a tertiary device.
    - Delete the files from the Flash Recovery Area using RMAN.
    - Changing RMAN retention policy.
    Bye, Aron

  • Need the rman backup sequence in taking the backup

    Hi,
    I just need the sequence in taking the backup of full database through rman.
    Current method
    1. Datafiles
    2. Archivelog files
    3. Control file.
    But I am noticing missing of some archive log when i am doing the recovery files. So, i just want to change my nightly backup to the below procedure
    1. datafiles
    2. control files
    3. archivelog files.
    Correct me, the suitable procedure for scheduling.
    Thanks,
    Ramesh G
    Edited by: user13095767 on Sep 7, 2012 9:02 PM

    Let me explain my question once again..
    I didn't get my requirements..
    Recently, faced a scenario while recovery my database...
    I am having nightly scheduled backup in the below manner...
    1. database backup.
    2. archive log files backup
    3. control file backup.
    My archive log files backup completed by 22:10. and my control file backup completed by 22:29. In between there was an archive generated at around 22:15.
    i want to restore and recover the database with this backup. Followed the below scenario
    1. restored the controlfile
    2. restore database
    3. recover database
    Finally, it is asking for the archive generated at 22:15 and at 22:49.
    So, by this i came to know that my database backed up with missing of archives. if i go with the below scenario of taking the backup
    1. datafiles
    2. control files
    3. archive log files
    Thinking that the archive log files backup pieces infomation will not be available in the controlfile..
    Which one will be the best option in scheduling our backups.
    Taking controlfile backup before archivelog or taking archivelog backup and then the controlfile.
    Thanks,
    Ramesh G

  • !! Urgent Help Needed in Database Table Recovery !!

    Hi,
    What happened is I add a new field to the table. It's a field which need reference but I didn't include it and proceed with table adjustment in under SE11->Utilities->Database Adjustment. I encountered an error during adjustment saying that the reference field is not set and I can't proceed further since the table is now locked. There's 2 options, to continue adjustment and to unlock the table. When I choose continue adjustment, it still lead to the same problem, so i choose to unlocked it thinking that I could be able to change it since there's a prompt saying that I might loose some data. Once I clicked on onlocked, then I it tells me that the adjustment is done. However, I found out that now my table was not editable. It's saying that it's not in the database.
    Can this table be recovered without the lost of data? Please anyone, I need this help urgently. THanks you in advance.

    Your DBAs might be able to help you.
    Rob

  • Help needed! Usb Data recovery software for word documents?

    A friend of mine has saved ALL of her precious work on a USB pen, which for no apparent reason has stopped working!
    It isn't being recognised by windows, but my mac is detecting it with trial software which I cannot buy on my measly student income. Not doable.
    Is there any data recovery software available for macs which detect microsoft documents which is....ummm free?
    It's beginning to drive me mad I've been looking at this stupid pen for ages. But my mate has offered me 50 quid if I get it sorted, so I am persevering! Any help would be appreciated guys!

    You can try the free Demo version of Data Rescue. It does not detect Word files; it's looking for anything on the device that matches the criteria you set.
    Hope this helps,
    Mulder
    If my answer helped solve your problem, please consider awarding some points. Why Reward Points?
    iMac G4 700Mhz   Mac OS X (10.3.9)  

  • Help Needed With a Backup Script

    I am writing a DNS server backup script with additional options. 
    Backing Up DNS Server Daily
    Create a folder based on current date
    Copy the backup from source to newly created folder based on date
    Complicated part (well, for me anyway :) )
    keeping current month's backup (30 different copies/Folder of backup for each day)
    Create a folder every calender month and and copy all 30 copies of backups within this folder
    Email Results of copying process either success or failed
    So Far i have the following which covers half of what is required! 
    $date = Get-Date -Format yyyyMMdd
    New-Item C:\dnsbk\DNSBackup$date -ItemType Directory
    $1st = Export-DnsServerZone -Name test.ac.uk -Filename backup\test.ac.uk.bk
    $2nd = Export-DnsServerZone -Name _msdcs.test.ac.uk -FileName backup\_msdcs.test.ac.uk.bk
    $source = "C:\windows\system32\dns\*"
    $destination = "C:\dnsbk\DNSBackup$date"
    $copy = Copy-Item -Recurse $source $destination
    $successSubject = "Backup Completed Successfully"
    $SuccessBody = "$1st,$2nd,$copy" <<<<<< This does not work >>>>>
    Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject $successSubject -SmtpServer 192.168.0.1 -Body $SuccessBody

    Hi IM3th0,
    If you want to confirm whether the copy operation run successfully and pass the result to the variable $SuccessBody, please try the script below:
    $copy = Copy-Item -Recurse $source $destination -PassThru -ErrorAction silentlyContinue
    if ($copy) { $SuccessBody="copy success" }
    else { $SuccessBody="Copy failure"}
    Reference from:
    how to capture 'copy-item' output
    If you want to remove the other 29 copies and keep the lastest one, please filter the 29 copies based on lastwritetime:
    $CLEANUP = (Get-DATE).AddDays(-30)
    $CLEANUP1 = (Get-DATE).AddDays(-1)
    Get-ChildItem | %{
    if($_.lastwritetime -gt $CLEANUP -and $_.lastwritetime -lt $CLEANUP1){
    Remove-Item $_.fullname -whatif}
    If I have any misunderstanding, please let me know.
    I hope this helps.

  • Delete RMAN backup

    Oracle 11.2.0.1
    Windows
    I takes RMAN backup at D:\RMAN_BAKCUP of our test database. Now there is space problem, I have to allocate some space to other folder. I shall take cold backup of database by shutdown. How do I start to delete RMAN backup from above location. It is incremental backup. What precautions should be there while deleting RMAN backup with archive logs.
    Can I delete all archive logs too after consistent backup by shutting down the database ?
    I am facing space problem, thats why I though that I shall take cold backup of db and now no need of rman backup as well as archive logs. Am I correct ?
    Thanks.

    user12050217 wrote:
    Oracle 11.2.0.1
    Windows
    I takes RMAN backup at D:\RMAN_BAKCUP of our test database. Now there is space problem, I have to allocate some space to other folder. I shall take cold backup of database by shutdown. How do I start to delete RMAN backup from above location. It is incremental backup. What precautions should be there while deleting RMAN backup with archive logs.
    Can I delete all archive logs too after consistent backup by shutting down the database ?
    I am facing space problem, thats why I though that I shall take cold backup of db and now no need of rman backup as well as archive logs. Am I correct ?
    Thanks.Given what else I've read in this thread (test database, no need for point in time recovery, etc.) A 'cold' backup may be appropriate, but I'd still use rman to do it. I have a similar situation right now with one of my test databases. I took an rman cold backup (database is open MOUNT) with KEEP UNTIL 'SYSDATE + 60'. Once, sometimes twice, a day the developer asks for a restore to the backup. Piece of cake with rman, especially with a little script all ready to go. Would be a bit more difficult with a 'user managed' backup.

  • Considerations for keeping RMAN Backup Retention to 1 Year

    Dear All,
    We are using 2-node 10gR2 RAC on Windows Server. We use Symentec Netbackup 7.5 for backing up Oracle databases. We want to change the retention period of RMAN backups to 1 year. Other than changing the RMAN Backup recovery window to 365, what are the other considerations (other configuration change, other point etc) we should be aware of?
    Best regards,
    Riaz

    > Other than changing the RMAN Backup recovery window to 365, what are the other considerations (other configuration change, other point etc) we should be aware of?
    Use RMAN Catalog.
    How to restore your database if a storage failure occurs and all files on filesystem be lost and all rman files be at MML.
    RMAN need a catalog to request files from MML (this catalog can be a controlfile, rman catalog or both), so if you lost your controlfile without RMAN Catalog you need manually find desired files on MML and restore it one by one if these files are not cataloged in that controlfile restored, since Oracle does not catalog files stored at MML. RMAN catalog files only stored on disk.

  • RMAN Backup on another server

    Hi,
    I am using oracle database 11g, and I am taking RMAN backup in the same server.
    But now I need this RMAN backup to be saved on another server.
    I created one database directory, but it did not work with me, since it cannot see the location.
    I used the same idea with export file to another server and it worked.
    But with RMAN directory it could not work !!!.
    So any idea about this ?
    Thanks and Best Regards.
    Pure,

    Pure wrote:
    Hi,
    I am using oracle database 11g, and I am taking RMAN backup in the same server.
    But now I need this RMAN backup to be saved on another server.
    I created one database directory, but it did not work with me, since it cannot see the location.
    I used the same idea with export file to another server and it worked.
    But with RMAN directory it could not work !!!.
    So any idea about this ?
    Thanks and Best Regards.
    Pure,How do I ask a question on the forums?
    SQL and PL/SQL FAQ
    my car does not go.
    tell me how to make my car go.
    Is COPY & PASTE broken for you?

  • RMAN backup performance tuning

    Hi All,
    We have oracle 9iR2 two nodes RAC on solaris 9, I am looking for some helpful material on RMAN backup performance tuning, though i went through oracle's official RMAN performance tuning guide, still if there is some really nice material please let me know!
    TIA

    Oracle Material is the best.
    Anyway, the one given below is also a good P&T book.
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm
    I am looking for some helpful material on RMAN backup performance tuningTip: Give a good value for large_pool_size buffer for a better RMAN performance. For RAC configure channels on multiple nodes for parallel backup process through RMAN,
    CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
    CONFIGURE DEFAULT DEVICE TYPE TO sbt;
    CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT 'usr1/pwd1@n1';
    CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT 'usr2/pwd2@n2';
    CONFIGURE CHANNEL 3 DEVICE TYPE sbt CONNECT 'usr3/pwd3@n3';
    BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
    [email protected]

Maybe you are looking for