4 Replies Latest reply: Jun 14, 2013 7:14 AM by user10743774 RSS

    RMAN command in  Oracle VSS Writer for  incremental/differential restore

    1011723
      Hello
      Working on application to support incermental/differential backup via VSS ( Oracle VSS Writer )
      Accoding to documentation about [Performing Database Backup and Recovery with VSS  |http://docs.oracle.com/cd/E11882_01/win.112/e10845/vss.htm]
      Oracle VSS Writer does not perform default recovery of Archived redo log or flash recovery component. (This component is defined to contain only log or incremental files)
      Nevertheless, the requestor application can invoke required RMAN commands.
      What RMAN command is needed to be performed for incermental logs recovery? (This command is set in VssBackupComponents::SetRestoreOptions call and will be performed on PostRertore Phase by Writer)
      I have tried RESTORE ARCHIVELOG ALL but did not succeeded .
      Thanks
        • 1. Re: RMAN command in  Oracle VSS Writer for  incremental/differential restore
          tychos
          Hello,
          Reading the pdf it show the Oracle VSS Writer is a backup solution using the concept of disk snapshot technology.
          This is different from rman technology where for instance backup sets or image copies are created using rman commands.
          So as no rman commands are used to generate backups and rman commands to restore / recover the database won't work.
          You have to use oracle vss writer commands to restore / recover a database to a consistent state.
          Regards,
          Tycho
          • 2. Re: RMAN command in  Oracle VSS Writer for  incremental/differential restore
            1011723
            Hello
            Thank you for your answer.
            I do all calls according to VSS API reference ( for example it works for incremental MS Exchange VSS backups, but does not for Oracle)
            This is my sequense of actions for VSS component-based backup/restore for differential case:
            Database is in ARCHIVELOG mode
            Backup
            1. Do full backup (or inremental level 0 - in Oracle terms) by selecting Oracle database component
            - do changes in database
            2. Do differential backup by selecting Flash Recovery Area /Archive logs component
            Restore sequentially:
            1.Do restore of data from Backup Stage 1(full data). Select the component named Oracle Database from a VSS snapshot (Have tried VSS call as SetAdditionalRestores(true) as SetAdditionalRestores(false) ). Do VSS restore
            2.Do restore of data from Backup Stage 2( differential logs). Select the component named Flash Recovery Are/Archive log from a VSS snapshot. Do VSS restore

            Restored data is actual before changes performed prior to differential backup(backup stage 2), so logs does not restored .This result is expected as Oracle Writers does not perform PostRestore operations for Archive logs, so I need to set RMAN command for Oracle Writer to run it on PostRestore stage (according to Oracle docs )
            But what RMAN commant to perform?

            Edited by: 1008720 on Jun 3, 2013 5:29 AM
            • 3. Re: RMAN command in  Oracle VSS Writer for  incremental/differential restore
              1011723
              Let we describe my oracle VSS backup/restore proccess in details

              Succeeded with full backup/restore only, but failed to to implement differential one.

              Oracle VSS Writer support only three components for explicit selection for backup: Oracle Database and it sub-component: Flash Recovery Area/ArchivedLogs.
              For full backup stage I explicitly select these components
              Why not only Oracle database as ancestor of Flash Recovery Area/ArchivedLogs?
              As oracle vss writer uses time stamp mechanism for incremental and differential backups,
              I select all these components for full backup stage (to get previous timestamps for Flash Recovery Area/ArchivedLogs on differential backup phase. With explicit selection these components its timestamps will be added to backup component document. )
              On diferential backup phase I select Flash Recovery Area/ArchivedLogs only using previous backup stamp(SetPreviousBackupStamp call), loaded from previous backup component document.

              Restore perform sequentially:
              1. Restore data from full backup phase (select all these three components for Restore), but do SetAdditionalRestore(true) for OracleDatabase component to avoid bringing Oracle database only after full restore phase
              2. Restore data from differential phase (select Flash Recovery Area/ArchivedLogs for Restore only( even can't select Database as there is no record in backup component document about it on differential phase backup) and call SetAdditionalRestore(false) for these components
              As Oracle Writer does not perform default recovery of this component. Nevertheless, the requester application can run required RMAN commands(via setRestoreOptions VSS call). I tried as RECOVER DATABASE as RESTORE ARCHIVELOG ALL commands , but failed to restore database.
              If I restore full backup phase(without differential) only and call SetAdditionalRestore(false) for Oracle Database component, Oracle VSS writer restores data successfully and mount database.
              How to restore differential part?
              • 4. Re: RMAN command in  Oracle VSS Writer for  incremental/differential restore
                user10743774

                I think you should set POST_WTRCMD=NORECOVER with SetRestoreOptions for 1st restore. Take a look at http://docs.oracle.com/cd/E11882_01/win.112/e10845/vss.htm#NTQRF280

                I'm also developing a requestor for Oracle VSS Writer, but I'm not quite there yet