FS
Documentation

Backup3G/DA-Oracle/User Guide/Searching and Restoring Oracle Backups

From Documentation

(Difference between revisions)
Jump to: navigation, search

Revision as of 05:31, 12 April 2006

COSbackup’s Recovery module lists all the current backups in the media database, including Oracle backups. 26 Searching and Restoring Oracle Backups Searching Oracle Backups You use the COSbackup Recovery module to search for and restore from Oracle backups. You can open a media set to view its contents and restore all or selected files. See Selecting Oracle Backups to Restore on page 29. To launch the Recovery module From the COSbackup button bar (GUI) • Select the Recover button. From the COSbackup main menu (CUI) • Select Recovery from backups from the COSbackup main menu. What Oracle Objects Can You Search For If you don’t know which media set contains the correct backup, you can search the media contents table for all backups of a particular Oracle object. These are the types of Oracle object you can search for: SID An entire instance. You can’t specify a pattern search when searching for a SID. Simply choose a SID to display all matching backups. tablespace Tablespaces are listed in the media contents table in the form: TABLESPACENAME:filename. To search for a particular tablespace, enter the name in the Pattern field followed by /*. Example: Searching and Restoring Oracle Backups 27 To search for a set of tablespaces with similar names, use the * wildcard in the tablespace name. Example: control A control file, which records the name, location, and state of all data files and redo log files in the database. redo Online redo log files, which record recent changes to the database. archive Archived or ‘offline’ redo log files. To Search for Backups of an Oracle Object 1. Select Search > Oracle. The ‘Search media contents for Oracle objects’ prompt form is displayed. Figure 9 — ‘Search media contents for Oracle objects’ form 28 Searching and Restoring Oracle Backups Enter the following search fields. Object type Select the type of object you want to search for. SID Choose the SID. Pattern For objects other than whole SIDs you can specify a pattern (see What Oracle Objects Can You Search For on page 26). Only objects whose name matches the pattern will be returned. The type of pattern matching is determined by the Pattern type field. Press Choose to list the names of all backups of this object type. Choose one. Leave the pattern as is to search for all backups for this object. If you wish you can use wild cards to broaden the search. Host Choose a host, or leave this field blank to search all hosts. Written on or after Limit the search to backups written from this date until today. Written on or before Limit the search to backups written on this date or earlier. Pattern type Select ‘filepat’ to treat the contents of the Pattern field as a shell file pattern. Select ‘regexp’ to treat the contents of Pattern as a regular expression. Press Accept to initiate the search. COSbackup lists each media set containing a backup of this object type and SID that matches the pattern. You can restore selected directories in background or interactive mode from this list. If the list is long, use the Search function to jump to a particular backup by entering all or part of the name. Searching and Restoring Oracle Backups 29 Selecting Oracle Backups to Restore Caution Don’t restore files to an online database. Only restore files to an offline database to ensure that database integrity will be maintained. Target Host and Directory Some COSbackup users have restrictions on which hosts and directories they can restore to (see Restricting Recovery Destinations by Role in the COSbackup User Guide for more details). For example users with the Operator role may be restricted to restoring files to the /tmp directory on any host, and to any directory on host ‘playpen’. If you have any such restrictions, COSbackup will ask to choose a target host and directory from the list of permitted destinations. If you have no restrictions you can choose any host and directory in the ‘Recovery Details’ prompt form. Symbolic Links DA-Oracle follows symbolic links during an online or offline backup. That is, it backs up the target of the link, not just the link itself. When you restore from backup the target of a symbolic link, make sure you restore the data to its original location, and not to the location of the link. Example: /usr/orahome/dbs/log1WG73.log is a link to the redo log file /var/B1/dbs/log1.log. When you restore this redo log from an online backup, select the file name from the media contents and specify the target directory as /var/B1/dbs. If the link /usr/orahome/dbs/log1WG73.log has been removed you will need to recreate it. 30 Searching and Restoring Oracle Backups To Restore from an Oracle Backup 1. From the Recovery module, select the media set containing the backup to be restored. 2. Select Contents > Open to list the contents of the media set. Each file in the media set corresponds to an item in the backup job. 3. Select the files to restore: 4. Select Recover > Background. 5. If you have any recovery restrictions, COSbackup will list which directories and hosts you can restore to. Choose a destination. If you have no restrictions, this step is skipped. Fill in these fields in the ‘Recovery Details’ prompt form. Figure 10 — Where to restore the selected files Recover to host Select the name of the host to which the files should be restored. The default is the original host. To select a file: click on it. To select several files: click and drag from the first file down to the last. To add a file to the selection: Control-click on it. To extend the selection: Shift-click on another file. To select all files: press Control-Shift-Button1 Searching and Restoring Oracle Backups 31 Into directory Specify where the restored files should go. The target directory will be created if it doesn’t already exist. When you restore the backup files, any existing files of the same name in the target directory will be overwritten. Therefore, it is best to restore to a temporary directory first. Caution Don’t restore files to an online database. Only restore files to an offline database to ensure that database integrity will be maintained. Drive/Pool Press Choose to see the list of valid drives and drive pools. Choose a drive and press Accept. Auto unload Select ‘yes’ to unload the backup tape from the drive after the recovery has finished.