12.07.2015 Views

BrightStor ARCserve Backup - SupportConnect

BrightStor ARCserve Backup - SupportConnect

BrightStor ARCserve Backup - SupportConnect

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>BrightStor</strong> ® <strong>ARCserve</strong> ® <strong>Backup</strong>Support for Oracle <strong>Backup</strong> and Restore onWindows 64-Bit Platform- 1 -


1. SummaryThe <strong>BrightStor</strong>® <strong>ARCserve</strong>® <strong>Backup</strong> r11.5 SP2 Windows Oracle Agent does notsupport the backup and restore of Oracle databases on a Windows 64-bit platform.This document provides a semi-automated workaround to support the backup andrestore of Oracle databases on a Windows 64-bit platform.<strong>Backup</strong> and restore can be achieved manually by using the Oracle command linebackup utility RMAN to back up the Oracle DB backup pieces to disk. Thesebackup pieces are then backed up using the <strong>ARCserve</strong> Client Agent. Duringrestore, these backup pieces are restored to their original location on disk usingthe <strong>ARCserve</strong> Client Agent.Finally, the RMAN restore script is used to restore and recover the database.Section 3 lists the RMAN script templates that are most commonly used forbackup and recovery. For more information, see the following Oracle manuals:<strong>Backup</strong> and Recovery Basics<strong>Backup</strong> and Recovery Advanced User's Guide<strong>Backup</strong> and Recovery Reference2. <strong>Backup</strong> and Restore ProcessRMAN1<strong>ARCserve</strong>Client Agentfor Windows3Tape /Disk2 4Oracle DB Server Disk <strong>Backup</strong> ServerOracle Database Server<strong>ARCserve</strong> <strong>Backup</strong> Server- 3 -


Note: Optionally, the Oracle DB server and the <strong>ARCserve</strong> backup server canbe hosted on the same machine.<strong>Backup</strong> Process1. Run RMAN scripts to back up the Oracle DB to disk.2. Windows Client Agent installed on the Oracle DB server machinebacks up the Oracle DB backup pieces stored on disk and sends themto the backup server.3. <strong>ARCserve</strong> <strong>Backup</strong> server backs up the Oracle backup pieces to tapeas a restorable session.Restore Process1. Submit a restore job from <strong>ARCserve</strong> server.2. The <strong>ARCserve</strong> Client agent for Windows restores the session to disk.3. Run RMAN restore scripts to recover the Oracle DB pieces from disk.3. RMAN Command and Script TemplateNote that the bold characters are version-related. All the user-specificparameters are italicized.3.1 Oracle 8.01. RMAN CommandRMAN80.EXE TARGET /@ NOCATALOG CMDFILE=‘‘Or, if a Catalog Database will be used:RMAN80.EXE TARGET /@ RCVCAT /< catalogDB user password>@< catalog DB name> CMDFILE=‘


RELEASE CHANNEL ;}2. List ScriptList backup of database//controlfile/archivelog;3. Restore ScriptRUN{ALLOCATE CHANNEL TYPE DISK;RESTORE DATABASE;RECOVER DATABASE;RELEASE CHANNEL ;}3.2 Oracle 8i and Oracle 9i1. RMAN CommandRMAN.EXE TARGET /@ NOCATALOG CMDFILE=‘‘Or, if a Catalog Database will be used:RMAN.EXE TARGET /@ CATALOG /@< catalog DB name> CMDFILE=‘‘2. <strong>Backup</strong> ScriptRUN{ALLOCATE CHANNEL TYPE DISKFORMAT ‘\%u_%p_%c.‘;BACKUP FULL DATABASE;SQL ‘ALTER SYSTEM ARCHIVE LOG CURRENT’;BACKUP ARCHIVELOG ALL;BACKUP CURRENT CONTROL FILE;RELEASE CHANNEL ;}3. List ScriptSee Oracle 80 List Script.4. Restore ScriptSee Oracle 80 Restore Script.3.3 Oracle 10gr1 and Oracle 10gr21. RMAN CommandSee Oracle 8i and Oracle 9i, RMAN Command.- 5 -


2. <strong>Backup</strong> ScriptRUN{ALLOCATE CHANNEL DEVICE TYPE DISKFORMAT ‘\%u_%p_%c.‘;BACKUP FULL DATABASE;SQL ‘ALTER SYSTEM ARCHIVE LOG CURRENT’;BACKUP ARCHIVELOG ALL;BACKUP CURRENT CONTROL FILE;RELEASE CHANNEL ;}3. List ScriptSee Oracle 80 List Script.- 6 -


4. Restore ScriptRUN{ALLOCATE CHANNEL DEVICE TYPE DISK;RESTORE DATABASE;RECOVER DATABASE;RELEASE CHANNEL ;}4. Parameter File <strong>Backup</strong> and RestoreThe two Oracle Parameter Files are the PFILE and the SPFILE. By default, thePFILE is located in %ORACLE_HOME%\database\init.ora; theSPFILE is located in %ORACLE_HOME%\database\spfile.ora.However, these two files could be located anywhere. Before you back up aspecific set of these files, make sure that the set that you are backing up is in usecurrently by the instance that you are backing up and that it is not a backup copytaken at a point in time.We suggest that you use the <strong>ARCserve</strong> Client Agent to backup and restore theOracle Parameter Files. Simply treat them as common files for backup andrestore.5. <strong>Backup</strong> and Restore Steps5.1 <strong>Backup</strong>1. Write an RMAN backup script file following the format as indicated in the templateshown in Section 3. If you want to back up other individual database objects, forexample, tablespaces or datafiles, see the appendix to find the appropriate RMANcommands.Note: For more information, see the following Oracle manuals:<strong>Backup</strong> and Recovery Basics<strong>Backup</strong> and Recovery Advanced User's Guide<strong>Backup</strong> and Recovery Reference2. Go to the command prompt, and execute the RMAN script.3. Check the RMAN command output. Verify that the script runs without generatingerrors.4. Check the backup pieces in the specific folder. Verify that the files are there, andthe file names are the same as in the RMAN command output.5. Use the <strong>ARCserve</strong> Client Agent to back up the backup pieces generated by the- 7 -


RMAN command.6. Use the <strong>ARCserve</strong> Client Agent to back up the Oracle Parameter Files.7. Verify in the <strong>BrightStor</strong>.log and the <strong>ARCserve</strong> database that the backupsucceeded and that all files are backed up.5.2 Restore1. Write an RMAN list script.2. Go to the command prompt, and execute the RMAN script.3. Identify through review of the backup catalog information what you need torestore.4. Restore the desired backup pieces to the original location using the <strong>ARCserve</strong>Client Agent from the <strong>ARCserve</strong> Manager.5. Make sure that all the backup pieces are restored to the original location.6. Modify the Oracle database status for restore.7. Write an RMAN restore script.8. Go to the command prompt, and execute the RMAN restore script.9. Check the RMAN command output. Verity the script runs without generatingerrors.10. Alter the database to reflect the expected status. Verify the restored Oracledatabase content manually.6. <strong>Backup</strong> and Restore Example6.1 Environment1. IA64, 64-bit Windows 2003 Enterprise server.2. 64-bit Oracle 10gr2. The Oracle database instance name is ORADB anddoes not configure the Catalog Database. The Oracle user name is “sys”; thepassword is “oracle.”3. 64-bit <strong>ARCserve</strong> Client Agent.4. <strong>ARCserve</strong> server is deployed on another 32-bit machine.5. Two channels are used for the RMAN backup.6. The backup script file name is d:\scripts\backup.sql. The restore script filename is d:\scripts\restore.sql. The list script file name is d:\scripts\list.sql.7. The backup destination is d:\backup pieces\.6.2 <strong>Backup</strong>1. Write an RMAN backup script file, c:\backup.sql. The content of the script filefollows:RUN{ALLOCATE CHANNEL dev1 DEVICE TYPE DISK- 8 -


FORMAT ‘d:\backup pieces\%u_%p_%c’;ALLOCATE CHANNEL dev2 DEVICE TYPE DISKFORMAT ‘d:\backup pieces\%u_%p_%c’;BACKUP FULL DATABASE;SQL ‘ALTER SYSTEM ARCHIVE LOG CURRENT’;BACKUP ARCHIVELOG ALL;BACKUP CURRENT CONTROL FILE;RELEASE CHANNEL dev1;RELEASE CHANNEL dev2;}2. Execute a “cmd” command.3. Execute the RMAN command:RMAN.EXE TARGET sys/oracle@ORADB NOCATALOGCMDFILE=‘d:\scripts\backup.sql’- 9 -


- 10 -


4. Check the RMAN command output for errors.- 11 -


5. Check the backup pieces in the specific folder. All files should be there, and thefile names should be the same as in the RMAN command output.6. Use the <strong>ARCserve</strong> Client Agent to back up the backup pieces generated by theRMAN command.- 12 -


7. Use the <strong>ARCserve</strong> Client Agent to back up the Oracle Parameter Files.8. Check the <strong>ARCserve</strong> database to make sure that the backup succeeds and allthe files are backed up.- 13 -


6.3 Restore1. Before restoring, delete the backed up files under d:\backup pieces.2. Write an RMAN list script file c:\list.sql. The content of the script file follows:List backup of database;- 14 -


3. Execute a “cmd” command.4. Execute the RMAN command:RMAN.EXE TARGET sys/oracle@ORADB NOCATALOGCMDFILE=‘d:\scripts\list.sql’5. Check the backup catalog information to identify what needs to be restored. Writedown which backup pieces you need:D:\BACKUP PIECES\0CI03BNJ_1_1D:\BACKUP PIECES\0BI03BNJ_1_1- 15 -


6. Restore the desired backup pieces to the original location using the <strong>ARCserve</strong>Client Agent.- 16 -


7. Make sure that all the backup pieces are restored to the original location beforeyou perform the following task.8. Modify the Oracle Database to the specific status for restore operations. In thisexample, the entire database (excluding the control file) will be restored. Thedatabase should be in a MOUNT state. For more information, see the OracleAdministrator's Guide.- 17 -


9. Write an RMAN restore script file c:\restore.sql. The content of the script filefollows:RUN{ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;RESTORE DATABASE;RECOVER DATABASE;RELEASE CHANNEL dev1;}10. Execute a “cmd” command.11. Execute the RMAN command:RMAN.EXE TARGET sys/oracle@ORADB NOCATALOGCMDFILE=‘d:\scripts\restore.sql’12. Check the RMAN command output. In this example, there are no errors.- 18 -


13. Alter the database to reflect the expected status. In this example, the databasestatus is OPEN Verify the restored Oracle database content manually.- 19 -


7. Error Conditions and ExceptionsIn the following example, the RMAN script file full path contained blankcharacters. Use a short path to avoid this situation.- 20 -


1. To restore the backup to an alternative location, modify the database cataloginformation accordingly. For more information, see the Oracle <strong>Backup</strong> andRecovery Reference guide.The following example uses the “List backup of database” command to checkthe current backup catalog information. No backups are available because allof the backup information was previously cleared. The backup pieces are allavailable on disk, so you can import the catalog information from the backuppieces using the “catalog backuppiece ” command.Run the “List backup of database” command again to view the cataloginformation with new file locations on the C drive. The original locations arethe same as in the preceding example.- 21 -


- 22 -


2. Sometimes the parameter file does not contain real content; instead, itcontains a link to another file. After you create a new database, one PFILE willbe located in %ORACLE_HOME%\database\init.ora, but itscontent is a file link. In this situation, if you want to back up the parameter files,back up both the PFILE and the SPFILE file as part of the backup process, forexample:“D:\oracle\product\10.2.0\db_1\database\initORADB.ora”and“D:\oracle\product\10.2.0\db_1/dbs/spfileORADB.ora”- 23 -


8. Appendix1. Recommendations for restoring Oracle Parameter and Control files follow.a) Restore the Oracle Parameter Files only if the following problems areencountered:• The database cannot be started because of a problem withthe parameter file.• The Oracle Parameter File has been deleted.• The database was restored to another machine.b) Restore the Oracle Control Files only if the following problems areencountered:• The Oracle Control File has been deleted.• The database was restored to another machine.2. Some useful RMAN commands follow. For advanced RMAN commands, seethe Oracle <strong>Backup</strong> and Recovery Reference guide.a) Back up tablespaces and datafiles.RUN{ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;BACKUP TABLESPACE , ;BACKUP DATAFILE ‘’, ‘’;RELEASE CHANNEL dev1;}b) List the backup of database, tablespaces, datafiles, control file, andarchivelogs.LIST BACKUP;LIST BACKUP OF DATABASE;LIST BACKUP OF TABLESPACE , ;LIST BACKUP OF DATAFILE ‘’, ‘’;LIST BACKUP OF CONTROLFILE;LIST BACKUP OF ARCHIVELOG ALL;c) Check for the existence of the backup piece on the local disk.CROSSCHECK BACKUP;CROSSCHECK BACKUP OF DATABASE;CROSSCHECK BACKUP OF CONTROLFILE;CROSSCHECK BACKUP OF ARCHIVELOG ALL;- 24 -


d) Delete the expired backup pieces in the Oracle Information Catalog.To get the primarykey value of the backupset, use the LIST commandas described previously.DELETE EXPIRED BACKUP;DELETE EXPIRED BACKUP OF DATABASE;DELETE EXPIRED BACKUP OF CONTROLFILE;DELETE EXPIRED BACKUP OF ARCHIVELOG ALL;DELETE EXPIRED BACKUPPIECE , ;DELETE EXPIRED BACKUPSET , ;e) Add backup pieces to the Oracle Information Catalog.CATALOG BACKUPPIECE , ;f) Validate the backup piece on the local disk. To get the primarykeyvalue of the backupset, use the LIST command as describedpreviously.VALIDATE BACKUPSET ,;- 25 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!