10 Replies Latest reply: May 1, 2012 4:36 PM by 933972 RSS

    Using RMAN for backups but not with archive logs

    933972
      We run one 10.2.0.4 database, and the rest 11.2.0.3. All databases are on RHEL 5.7.

      Our backups are done via RMAN, with datafiles, controlfiles and spfile backed up to disk, then each day, it is copied offsite to a backups server.

      My question is around archive logs and RMAN.
      Our current situation is:
      - we do not back up the archive logs via RMAN. for example: list backup of archivelog all; gives "specification does not match any backup in the repository"
      - we set the archive_lag_target so archive logs are produced every 30 minutes.
      - a cron job running on a remote server runs periodically to synchronise (rsync) the archive directory with a remote server.
      - each day the archive logs on the host server are bzipped. Purging of these logs is set for 3 days longer than rman 'recovery window'.

      I am interested on feedback as to whether our strategy around archive logs is okay or not.

      Should we be backing up the archive logs via RMAN? Is there any potential issues with our approach?
      We have only kept our backups this way as the DBA in the past liked to see the archived logs as opposed to it all in a backupset.

      Curious as to what others do.
        • 1. Re: Using RMAN for backups but not with archive logs
          hitgon
          Hi,

          Better to take the RMAN backup with archive logs.

          backup as compressed backupset database plus archivelog delete all input;

          You can check the RMAN Archive logs backup and delete command in Data Guard Environment
          Usage of RMAN in Streams Environment [ID 421176.1]

          Regards
          Hitgon
          • 2. Re: Using RMAN for backups but not with archive logs
            Shivananda Rao
            Hi,

            Welcome to OTN !!

            Backing up archivelogs using RMAN is a better option. When the archives are backed through RMAN, RMAN would be aware of the backup pieces that comprise of the required archive at the time of recovery. You do not have to do manually.

            About disk space, you can delete the archives once they have been backed up by RMAN.
            RMAN>backup archivelog all delete input;
            This backs up the archivelogs and then deletes the archives from the disk.

            If you have a dataguard configured, then you can set the deletion policy to "applied on standby", which deletes the archives as and when they are applied to the standby database there by managing the disk space again.
            RMAN>configure archivelog deletion policy to applied on standby;
            • 3. Re: Using RMAN for backups but not with archive logs
              933972
              Thank you both for your replies.

              The archive logs are not stored in the FRA. I get the impression from this blog (http://blog.oracle48.nl/use-use_db_recovery_file_dest-for-self-managing-deletion-rules-of-the-archived-log-files/) that they should be. We also don't store multiplexed copies of the control files or online redo logs in the FRA (although autobackups do go to FRA). What are the advantages to storing a multiplexed copy of the online redo logs and control file in the FRA?

              We also don't perform an immediate snapshot after our RMAN backup (compressed backupset). Should our server fall over, we restore the snapshot with an older RMAN backup and apply the archive logs that have been rsync'd across from the backup server. We only have a log_archive_dest_1 defined locally.

              If we were to change to backing up our archive logs in the FRA and include 'delete input;', we have a vulnerable point in time when archive logs are backed up in the FRA but not anywhere else (the rsync command would remove them from the backup server). It seems our options are:
              a. set a local destination for log_archive_dest_2 which is a mounted remote destination
              b. alter our rsync command to look at the FRA
              c. move the entire FRA (and potentially all the FRA's of our databases) to a remote server

              Option a is probably the most obvious. b seems a fudge. c,... does anyone do this? (we do not use ASM or RAC).
              • 4. Re: Using RMAN for backups but not with archive logs
                Shivananda Rao
                Hi,

                Please refer Oracle Doc http://docs.oracle.com/cd/F49540_01/DOC/server.815/a67773/datastru.htm#6752 regarding multiplexing of control files and online redo log files.
                • 5. Re: Using RMAN for backups but not with archive logs
                  933972
                  Shivananda Rao wrote:
                  Hi,

                  Please refer Oracle Doc http://docs.oracle.com/cd/F49540_01/DOC/server.815/a67773/datastru.htm#6752 regarding multiplexing of control files and online redo log files.
                  That doesn't say anything about benefits of multiplexed redo logs or control files in the flash recovery area. Given it is a link to Oracle 8.1.5, I'm not surprised ;-)
                  • 6. Re: Using RMAN for backups but not with archive logs
                    Shivananda Rao
                    Apology for the document with the wrong version.

                    http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/storage.htm

                    The above document is with 10.2 and the concept of mulitplexing control files or the concept of FRA remains the same for 11.2 as well.
                    • 7. Re: Using RMAN for backups but not with archive logs
                      933972
                      I already have 2 x online redo groups and 2 x control files,... just that neither of them are located in the fast/flash recovery area (FRA).

                      The benefits of having the archive logs in the FRA have been mentioned, and yes, I will do that. But what about a multiplexed copy of the control file and one of the redo log file groups.... I can't find any benefit of shifting them into the FRA. Are they supposed to help during recovery?
                      • 8. Re: Using RMAN for backups but not with archive logs
                        933972
                        If we were to change to backing up our archive logs in the FRA and include 'delete input;', we have a vulnerable point in time when archive logs are backed up in the FRA but not anywhere else (the rsync command would remove them from the backup server). It seems our options are:
                        a. set a local destination for log_archive_dest_2 which is a mounted remote destination
                        b. alter our rsync command to look at the FRA
                        c. move the entire FRA (and potentially all the FRA's of our databases) to a remote server

                        Option a is probably the most obvious. b seems a fudge. c,... does anyone do this? (we do not use ASM or RAC).
                        I'm also interested in this question as well. Thinking about this, I would expect all log_archive_dest_x archive logs to be purged when the RMAN 'delete input' command is processed, so there is still that vulnerable moment between completion of a backup and the backup of the FRA when the FRA is on the local server.

                        Is it common practice for the FRA to be located remotely, or synchronised with a remote location? Call me paranoid (we have RAID 10 on the server),... I just like to know I'm covered.
                        • 9. Re: Using RMAN for backups but not with archive logs
                          stuartu
                          930969 wrote:
                          If we were to change to backing up our archive logs in the FRA and include 'delete input;', we have a vulnerable point in time when archive logs are backed up in the FRA but not anywhere else (the rsync command would remove them from the backup server). It seems our options are:
                          a. set a local destination for log_archive_dest_2 which is a mounted remote destination
                          b. alter our rsync command to look at the FRA
                          c. move the entire FRA (and potentially all the FRA's of our databases) to a remote server

                          Option a is probably the most obvious. b seems a fudge. c,... does anyone do this? (we do not use ASM or RAC).
                          I'm also interested in this question as well. Thinking about this, I would expect all log_archive_dest_x archive logs to be purged when the RMAN 'delete input' command is processed, so there is still that vulnerable moment between completion of a backup and the backup of the FRA when the FRA is on the local server.

                          Is it common practice for the FRA to be located remotely, or synchronised with a remote location? Call me paranoid (we have RAID 10 on the server),... I just like to know I'm covered.
                          All depends how remote your "remote server" is (think network latency)

                          One option re: rsync,.... you can distinguish your archive log backupset from your level 0 and 1 backups by using a tag. You could then use rsync to pick up files with the tag pattern and leave the other level 0/1 backps for your snapshot to pick up.
                          For example:
                          replace script backup_incr_1
                          {
                          backup incremental level 1 cumulative
                          database tag db_lvl_1 plus archivelog tag archivelogs delete all input;
                          }
                          
                          produces a file under your backupset/<date> like...
                          -rw-r----- 1 oracle oinstall  50368000 May  2 08:50 o1_mf_annnn_ARCHIVELOGS_7t0m49l1_.bkp
                          
                          You then use rsync...
                          rsync --delete -a --numeric-ids -e ssh <user>@<server>:<path>/*ARCHIVELOGS*.bkp <localpath>
                          
                          You'd also want a similar rsync command on your flashback archivelog directory but without the tag search pattern.
                          • 10. Re: Using RMAN for backups but not with archive logs
                            933972
                            Thanks, that is helpful. By remote, I mean a server in the same rack, so don't think that is an issue (although I will have to do more research into our bandwidth).