Script cleanup for full backup

I'd like to clean up some old scripts on the DB server (Oracle 10gR2).
There is a backup script for a full backup. I would like to remove the command "backup archivelog all" as "backup incremental level 0 database plus archivelog" already contains the archive logs. I would also like to remove the second "backup current controlfile" (the one just before "backup archivelog all") as I think it is redundant.
Or do I oversee anything?
rman target / <<EOF
configure channel device type disk format = '$BACKUP_DIR/back_%d_%s_%p_%t';
sql "alter system checkpoint";
sql "alter system switch logfile";
crosscheck archivelog all;
backup current controlfile;
backup incremental level 0 database plus archivelog;
backup current controlfile;
backup archivelog all;
###########

What is really easier than controlfile autobackup ? Except maybe the case when you are not using a recovery catalog and you have lost all you current control files, you have to retrieve DBID before restoring control file from autobackup...
Oracle recommends that CONFIGURE CONTROLFILE AUTOBACKUP be set to ON from Control File and Server Parameter File Autobackups.
It's even listed as number 8 in following Metalink note:
Subject:      Top 10 Backup and Recovery best practices.
     Doc ID:      Note:388422.1      Type:      FAQ
     Last Revision Date:      05-DEC-2007      Status:      PUBLISHED
Message was edited by:
Pierre Forstmann

Similar Messages

  • Suggested methods for full backup of XServe RAID data

    I know this is only peripherally related to the discussion topic, but since every other suggestion posted here is followed by the disclaimer that you should make a full backup of your data before proceeding with any major operations on your RAID arrays, I'd like to know what more experienced admins do in order to create a full backup for reasonably fast recovery in case of substantial data loss during maintenance/repair.
    Our current "backup" availability is incremental optical disc archival (our data is mostly "write-once"), but this isn't entirely practical for recovery since it's over a terabyte of data. Since the connected server has a free hot-swappable SCSI drive bay as well as an interface for external SCSI devices, not to mention the fiber channel and ethernet interfaces, the options that I'd consider in order would be:
    1. A handful of 150-500 Gb SCSI hard drives, rotated out of the hot-swappable bay
    2. An external tape drive attached to the SCI interface (with appropriate tape size, maybe the LTO-2 with 200Gb native capacity?)
    3. Some other external SCSI storage device
    4. Larger optical disc archival (I hear there are technologies arriving in the near future)
    5. Network-based option; remote seems impractical due to sheer size, but perhaps local?
    The idea is to make a full backup (long-term solutions are superior of course) of 1-2 Tb of data on the XServe RAID before attempting major surgery. Suggestions for common, accepted, tested, efficient methods for accomplishing this would be greatly appreciated. I apologize if this thread isn't on-topic enough for some of you.
    -Brian

    Brian,
    Tape IMO is kinda yucky (to steal a term from your average 3 year old). It's fairly slow to back up to, it's very slow to restore, and it's actually not that reliable by itself (I worked with a large enterprise customer who said their backups were successful about 70% of the time (!!!)).
    That said, tape has the advantage that you can offsite it and archive it very cheaply, and the media are fairly cheap, so you can make lots of backups, so if one fails, you probably can restore the data from another tape.
    Disks are more expensive initially, but end up being pretty reliable, and you get a lot more flexibility (plus, they're fast).
    An emerging "best of both worlds" backup strategy is what's called disk to disk to tape, where you typically back up to another large "disk," for example a second Xserve RAID. Data is then backed up from the second disk to tape, which is taken offsite... thus tape is used for what it's best at (offsite archival). Restore can be from disk in most cases, which is 10-20x faster than restoring from tape. People use software packages like Netvault's Bakbone or Atempo's Time Navigator, which can handle the whole process, and it works quite well. The backup disks (e.g. the RAID) can be onsite, or can be at a backup site a couple KM away, attached via optical (this is preferable, for DR reasons).
    For cases where a second Xserve RAID is prohibitively expensive, cheaper (and slower) RAID 5 enclosures like Wiebetech's RAIDtech can provide a large (say, 1.6 TB) RAID 5 volume, accessible over FW800 or SATA (not sure if they have a SATA-based one yet).

  • Syntax for full backup thru RMAN

    hi all ..
    i have oracle 11g installed on M5000, Solaris 10
    i want to take full backup of my database thru RMAN
    i have enter following on backup server
    . .db/env
    connect catalog rrkas/rr345
    (connected)
    connect target sys/root123@grid1
    (connected)
    RMAN> run {
    allocat channel dev1 type disk;
    backup database
    format '/export/home/oracle/dumps/grid3_%t_%sp%p';
    release channel dev1;
    it started the job.On my dbserver file is created as per the format.
    just want to ask, is it the right way to take full/physical backup? Is this backup enough to fully recover the files, in case a new RAC is added to the cluster?
    thanks in advance.

    If your database is running in ARCHIVELOG mode, this is not enough: you must backup archived redo logs for example with
    backup database plus archivelog:Read about consistent and inconsistent backups in http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmcncpt.htm#BABIHBBE and about archived redo logs backups in http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmbckba.htm#i1006454
    Edited by: P. Forstmann on 20 nov. 2009 07:42

  • Recommendations for Full Backups

    I need to backup my MacBookPro HD which has 2 partitions... 50% MacOSX and the other 50% WinXP.
    I was going to use Acronis TrueImage for the WinXP partition but their tech support said it doesn't work on Mac hardware which is a real bummer. Ideally I want a full ghost of my entire C:\ drive under WinXP with all the apps and data if possible.
    Suggestions would be very appreciated.

    TI 11 didn't but 2009 might. Had to do with support for GPT.
    Paragon has NTFS for OS X; CampTune; and Drive Manager 2009 which lists Boot Camp support.
    Vista Ultimate and W7 of course have built in backup files and PC support of their own.
    Norton 360 has backup feature.
    WinClone runs in OS X and useful to take single full snapshots.
    Microsoft SyncToy 2.0 is handy for folder synchronizing.

  • Automatic Offline Full Backup Plan: CQ5 Installed As a Service

    I have designed an Automatic Offline Full Backup Plan for CQ5 Installed As a Service. I welcome your comments.
    Do you have any better way (scripts)?
    Offline Full Backup Scripts for Author
    :: offlineAuthorBackUp_CQ5AsService.bat
    :: Stop CQ5 service
    chdir /D %~dp0
    net stop cq5
    ::copy all files and folders to the destination
    mkdir h:\cq5backup\offline\author\backup
    ::robocopy only copies the updated files, so it is very quickly
    c:
    robocopy /MIR c:\cq5\author h:\cq5backup\offline\author\backup
    :: Start CQ5 service
    net start cq5
    ::Zip the backup with 7z.exe
    h:
    cd h:\cq5backup\offline\author
    7z a -y -tzip offlineAuthorBackup_%date:~4,2%%date:~7,2%.zip h:\cq5backup\offline\author\backup

    There is one big advantage of a clone.  You can immediately reboot
    to it and continue working and deal with the regular boot drive faiure,
    what ever it may be, later.  Especially since all your data and such
    is on another drive.  If you use your computer for work and time
    critical projects, this is a major plus!
    In the case of a hard drive failure/replacement, copying the clone
    to the drive is the fastest way to get the system and all your settings
    back.
    Time Machine and incremental backups have a place as well.  It is best
    suited for "incremental" problems.  Examples are installing an upgrade to
    software that doesn't work or just don't plain like.  With Time Machine it
    is easy to just restore back to the point before the install.
    Something else I do is backup current project files to USB memory sticks.
    If you are using your computer for business, you can never have too many
    backups.  Coralllary 456 of Murphy's Law is the "number of backups that
    you need will be one more than what you have!"

  • Co-location for daily backup

    I have created a protection group for file server and taking backup of a share on tape drive.
    under protection method--> I chose I want short-term protection using : tape
    retention range: 1 week
    frequency of backup: daily
    backup mode: full and incremental
    so full backup on Saturday and other days incremental backup.
    I have around 700 GB data size.
    I have shortages of tape. from recovery option: I saw in this month on 12thOct, on Saturday it run full backup. It took one tape [say tape 1]
    on the next 6 days it run incremental backup on another tape.[say tape 2]
    again on Saturday for full backup it took tape 3 [tape 3]
    again to run incremental backup it is asking for free tape. and back up failed.
    in this way I am wasting space on tape. data size is 700 GB, tape size is around 3 TB.
    I can see there is option in 'optimize usage' where I can mention under advanced. write period and expiry tolerance.
    i believe I need to modify these settings.  please suggest if i want daily incremental backup and full backup on Saturday with 1 week retention and reuse the same tape or second tape instead of waiting for more tapes

    Hi,
    It is currently working as designed for tape library.
    See the following TechNet page:
    How DPM Uses Tape Libraries
    http://technet.microsoft.com/en-us/library/hh757885.aspx
    Short-term tape "full and incremental" option
    The full backup will require a free tape for each scheduled job, and the incremental backup for all data sources will be appended to a single separate tape.
    As tapes fill up, new free tapes will be allocated.
    When the next full backup occurs, it will require another free tape, and subsequent incremental backups will be appended to another free tape.
    So basically, you will need three sets of tapes for a 1 week retention range.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • FUll backup is taking 2 days to complete

    i have a maintenance plan setup for full backup and the total size of databases is around 4 TB. compress backup option is also enabled.
    it takes around 2 days to finish every week, what can be the potential problem?
    Regards
    k

    Hello,
    Could you please describe that local drive? Is that local drive part of RAID? 
    Is that drive dedicated for backups or it is shared with the operating system and SQL Server databases/binaries?
    How many cores/cpus on that computer?
    Could you please share the result of the following query?
    SELECT
    TOP 40 *
    FROM
    sys.dm_os_wait_stats
    ORDER
    BY wait_time_ms
    DESC
    Could you please share with us the average values of the following Performance Monitor (Control Panel) counters?
    Object: Physical Disk / Logical Disk
    Counters: Avg. Disk sec/Read, Avg. Disk sec/Write, Avg. Disk sec/Transfer, Avg. Disk Queue Length
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Full backup volume on RHEL5

    Hi Guru,
    I want to do a full backup volume (OS + Application Server + DB + File system) on my RHEL5 server to the tape drive. I use SAP 6.0 EHP5 and Oracle 11g Database on one machine.
    On IBM AIX we can tools "Smitty", what tools can be used for full backup volume on RHEL5?
    If using a 3rd party, what recommendations?
    Thanks and Regard,
    Ali Marjan

    Hi,
    For taking of backup....
    OS-----Tell u r OS team they will take necessary files on Tape.
    Database------Take full offline tape backup.
    Application------If it runs on different server take the "root,sapmnt" on tape.
    That's enough.
    Regards,
    Anil

  • Rman full backup issue

    Hi,
    The Media Management Layer GUI shows that my RMAN incremental level 0 (full) finished successfuly in the last 3 weeks.
    Yet , V$RMAN_BACKUP_JOB_DETAILS shows only incremental level 1 and archive log backups :
    SQL> select distinct input_type
      2   from V$RMAN_BACKUP_JOB_DETAILS ;
    INPUT_TYPE
    ARCHIVELOG
    DB INCRIt does not shows DB FULL .
    What elese i can check to be sure that my Full backups are finished successfully ?
    Thanks

    Hi,
    From the results of this statments i dont see DB FULL
    SQL> select distinct object_type from v$rman_status where operation='BACKUP';
    OBJECT_TYPE
    DB INCR
    CONTROLFILE
    ARCHIVELOGIn the second suggested query , the output results suggest for FULL backup :
    select ctime "Date",
           decode(backup_type, 'L', 'Archive Log', 'D', 'Full', 'Incremental') backup_type,
            bsize "Size MB"
    from (select trunc(bp.completion_time) ctime
                  , backup_type
                  , round(sum(bp.bytes/1024/1024),2) bsize
           from v$backup_set bs, v$backup_piece bp
           where bs.set_stamp = bp.set_stamp
           and bs.set_count  = bp.set_count
           and bp.status = 'A'
           group by trunc(bp.completion_time), backup_type)
    order by 1, 2;
    Date      BACKUP_TYPE    Size MB
    11-NOV-11 Archive Log       6304
    11-NOV-11 Full           1455291   <<<<===
    11-NOV-11 Incremental     1192.5
    12-NOV-11 Archive Log    4718.25
    12-NOV-11 Incremental     8939.5
    13-NOV-11 Archive Log    7391.25
    13-NOV-11 Full              23.5   <<<<===
    13-NOV-11 Incremental   13892.25
    14-NOV-11 Archive Log    4995.75
    14-NOV-11 Full              23.5   <<<===
    14-NOV-11 Incremental    4045.25
    15-NOV-11 Archive Log       2249
    15-NOV-11 Full              23.5   <<<<====
    15-NOV-11 Incremental    1617.75This of the first Full output : 1455291 M seems OK , but the rest are too small just 23 Mega .
    How come ?
    Also how can i be sure that this FULL backup finished successfully ?
    Thanks Again for you help

  • Shell script for export backup in oracle 11g

    Hi,
    Oracle version 11.2.0..
    O/S-AIX
    How to write shell script for export full backup in oracle 11g and also need to remove 2 days of old backup.
    Regards,
    Raju

    How to write shell script for export full backup in oracle 11g
    Do you mean that export is your backup strategy ? is your database running in noarchivelog mode ? if so, then why ? if not so, then why not RMAN ?
    need to remove 2 days of old backup.
    If that mean remove files older than 2 days, you can use something like this :
    $ find <absolute directory path> -mtime +2 -exec rm {} \;

  • Step by Step RMAN configuration for full hot backup daily

    Dear experts,
    i am new to oracle RMAN , i have gone through couple of RMAN guides for configuration ,
    i have oracle e-business suite (R12.1.1) and database is ( 11.1.0.7) on red hat enterprise linux 5.3 . All of this is 64 bit.
    i have a database about 175 gb which is as usual growing day by day as data entry is taking place.
    Untill now we have a cold backup strategy in the midnight 3 am a script down the database and make abc.tar.gz file of 25 gb approx. . This process takes about 100 minutes. But now due to new sales system we want our database up 24/7 .
    So we want to configure RMAN hot backup.
    I want to take backup on disk.
    daily full hot backup.
    backupsets
    currently database is in no-archivelog
    plz help me to proceed with this .
    Edited by: user13376823 on Feb 10, 2011 12:17 PM

    user13376823 wrote:
    Dear all,
    i am using this script for my full hot backup ,
    run
    allocate channel c1 device type disk format '/opt/R12Backups/rman/%U';
    allocate channel c2 device type disk format '/opt/R12Backups/rman/%U';
    crosscheck backup;
    BACKUP DATABASE FORMAT '/opt/R12Backups/rman/proddb_%u_%p_%c';
    sql 'alter system switch logfile';
    BACKUP ARCHIVELOG ALL DELETE INPUT FORMAT '/opt/R12Backups/rman/archlog%U';
    DELETE NOPROMPT OBSOLETE REDUNDANCY =1 device type disk;
    DELETE NOPROMPT EXPIRED BACKUPSET OF DATABASE device type disk ;
    BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/opt/R12Backups/rman/copy_of_cf_%U';
    BACKUP SPFILE FORMAT '/opt/R12Backups/rman/spfile_%U';
    release channel c1;
    release channel c2;
    1.please tell me that it is covering all aspects of a backup . Can i do complete recovery with this backup in case of disaster?
    Define "all aspects".
    2. i only get database and controlfile backup at my location. There is no backup of archivelogs , What happened with
    that ?Without seeing the output that rman generated from running the above block, and without seeing all of the persistent rman settings, it is impossible to diagnose anything. I will say that your script looks overly complex.
    Just to give you a point of comparison, here's my setup. First the persistent rman settings. Take note of anything that is NOT marked as "default";
    RMAN> show all;
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 3;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    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 '/ora00/app/oracle/product/10.2.0/db_1/dbs/snapcf_vlnxora1.f'; # defaultAnd here is my basic "full backup" script
    [oracle@vmlnx01 bin]$ cat rman_full.scr
    connect target /
    show all;
    run {
      backup incremental level 0 database tag='bkup_vlnxora1_full';
      backup archivelog all not backed up 2 times tag='bkup_vlnxora1_arch';
      delete noprompt archivelog all backed up 2 times to device type disk;
    list backup summary;
    report obsolete;
    quit

  • I bought a new external hard drive for backups, but time machine won't do a full back up.  I think it is remembering backing up onto previous external hard drives, which I don't own anymore.  How do I do a new full backup?

    I bought a new external hard drive for backups, but time machine won't do a full back up. 
    I think it is remembering backing up onto previous external hard drives, which I don't own anymore.  How do I do a new full backup?
    When I bought the new (used) iMac, I also bought an external hard drive for backups.  It worked fine, but my husband stole it.
    Then I bought a new external hard drive (Seagate) and it worked fine for three weeks, then died.
    So I just got a new external hard drive, which was put together from an internal hard drive and a hard drive enclosure. 
    Time machine did the first backup today, and it should have taken 9 hours like it did on the previous first time full back up.  Instead, it took 30 minutes.  That can't be right.  I want to start over and do a full backup to make sure everything gets onto my new external hard drive, but I can't figure out how to do that.  Please help.

    Triple-click anywhere in the line below to select it:
    tmutil compare -E
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command will take at least a few minutes to run. Eventually some lines of output will appear below what you entered.
    Each line that begins with a plus sign (“+”) represents a file that has been added to the source volume since the last snapshot was taken. These files have not been backed up yet.
    Each line that begins with an exclamation point (“!”) represents a file that has changed on the source volume. These files have been backed up, but not in their present state.
    Each line that begins with a minus sign (“-“) represents a file that has been removed from the source volume.
    At the end of the output, you’ll get some lines like the following:
    Added:
    Removed:
    Changed:
    These lines show the total amount of data added, removed, or changed on the source(s) since the last snapshot.

  • Getting error while running script for online backup

    Hi,
    I am running a script for online backup but ended up with an the below error.
    *ERROR* [Backup Worker Thread] com.day.crx.core.backup.Backup Failed to create temporary directory
    Please help out in resolving this.
    Thanks in Advnace.
    Maheswar

    Hi mahesh,
    If you are using backup feature from crx console, I mean http://localhost:4502/crx/config/backup.jsp  I can say that we had also some problems with this functionalities.
    First off all what you need to check are the permissions, because when you check a source code there is line which creates a File object using a path specified by you to make a backup of repository.
    File targetDir = new File(req.getParameter("targetDir", listDir.getParentFile().getAbsolutePath()));
    You need to have sure that the proper read write access has been granted for this path.
    Another issue is that maybe there was already prepared some hotfix if you are using CQ5.4. Please refer to the following link:
    http://dev.day.com/content/kb/home/Crx/CrxSystemAdministration/CRXOnlineBackup.html
    and also to this one:
    http://dev.day.com/content/docs/en/crx/current/release_notes/overview.html which contains a hotfix number #34797 which was applied to backup.jsp file.
    Regards,
    kasq

  • HT201250 Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller ext

    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller external drive?

    50maz wrote:
    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in
    Yes, it will do a full backup.
    and if so, do I really need all the old backups on my smaller external drive?
    Only if you want to be able to go back in time to those previous Time Machine backups.  When you plug in the new larger external drive, you will only be able to go back as far as the first day you plugged it in and ran the first Time Machine backup on it.

  • Best software for doing full backups to ext. hard disk to to be used to restore system

    As a new PC owner I wanted to find out what the best software for doing full backups to external hard disk,  to to be used to restore the system if primary primary disk crashes. Im aware that Windows, Acronis and Paragon all have software that doing varying degress of back and resore functions.

    lasvideo,
    My favorites are ShadowProtect to do an "image backup" of boot drive and Beyond Compare for backing up files for all other "data" arrays. ShadowProtect does not seem to have much market share compared with Ghost and Acronis, but I really love it.
    What I like about ShadowProtect:
    - Extremely fast (complete image backup for 61GB of files on my boot SSD RAID 0 array to a RAID data array takes less than 3 minutes)
    - Can do image backups across a LAN; restores from boot CDROM and USB device
    - Allows for backups from one controller and restore of OS on a different controller and/or RAID configuration (has HAL tools; Hardware ? Layer I think)
    - Can "mount" an image backup as a drive letter and see (and copy) all directories, files, etc. that are contained in the archive
    What I like about Beyond Compare:
    - Can choose what to backup and what to ignore very easily (for example you can set it to ignore certain files or directory names to ignore and then save how you set things up as a "session")
    - Only needs to copy over files that are new or have changed since your last backup
    - Makes it very easy to selectively delete files from your backup
    Regards,
    Jim

Maybe you are looking for

  • Adding form pagination without the wizard

    Hello, I'm trying to add a form pagination feature into an existing page. When I'm trying to use the Create Form Pagination Wizard I'm getting the following error: "The Create Form Pagination Wizard uses the onChange JavaScript event to alert users w

  • How do I use memory stick for pictures

    How do I use a memory stick for my pictures?  I put it in the side of computer?  I want to look at my pictures on it and save more on it?

  • Deployment problem in Reports 3.0

    Hi, I have my application build in oracle reports 3.0. But when i'am installing on client side,I install developer runtime version and copy all fmx and rep files on client side. Problem is some reports are not running.Error it shows is "REP-0002 Unab

  • ITunes not closing down - hanging on close down

    When I close down iTunes (using command Q or when shutting down the computer), iTunes does not close. There is just a spinning colorful wheel, and eventually a time out error. This happened first about a week ago, after upgrading to 10.2, and still h

  • Managing two libraries in iTunes - weird bug

    I have two iTunes libraries (that is both library database and music files) that I am trying to maintain. On my internal drive in my MacBook Pro in which I have a set of AAC files with their associated library databse. On an external drive I am creat