This chapter explains how to restore file-system objects backed up by Oracle Secure Backup.
This chapter contains these sections:
See Also:
Disaster Recovery of Oracle Secure Backup Administrative Data
Oracle Secure Backup Reference for a description of the restore commands in obtool
With Oracle Secure Backup, you can restore file-system data in the following ways:
Catalog-based restore operation
In this type of restore operation, you browse the Oracle Secure Backup catalog for the file-system objects to be restored. When you have located their names and selected the instances, you can restore the objects.You can use Oracle Secure Backup wildcard pattern matching while performing the restore operation.
See Also:
"About the Oracle Secure Backup Catalog" for an overview of the Oracle Secure Backup catalog
"About Oracle Secure Backup Wildcard Pattern Matching" for more information about wildcard pattern matching
In this type of restore operation, you identify the backup from which to restore files using the secondary storage location (volume ID and backup image file number) of a backup. A raw restore operation can be performed without using the backup catalog. You can either restore all data in the backup or specify an individual file or directory to restore.
See Also:
"About Volumes" for an explanation of volume IDs and backup image instances
You can use the obtar command-line interface to operate directly on a tape drive, outside the Oracle Secure Backup scheduler. The obtar
utility is intended for advanced users only.
See Also:
Oracle Secure Backup Reference for more information about obtar
Oracle Secure Backup maintains a discrete backup catalog for every client in the administrative domain. The catalog for each host is stored in a subdirectory of admin/history/host
named after the client. For example, admin/history/host/brhost2
stores the catalog for the client named brhost2
. The catalog itself is a binary file named indices.cur
.
To specify backups to restore, you can use obtool
or the Oracle Secure Backup Web tool to browse the contents of any client's backup catalog, providing you have necessary permissions. The class of which your Oracle Secure Backup user is a member defines your right to browse the catalog.
While browsing the catalog through the Oracle Secure Backup Web Tool, if you see <dirname>(E)
in red, then this indicates that a user made an attempt to specify a non-existent directory in the dataset description due to which the backup failed. This directory cannot be restored.
See Also:
"Overview of Oracle Secure Backup Classes and Rights" for more information about user rights
Oracle Secure Backup provides two means to control how time affects the data you select when browsing backup catalogs:
When you browse a backup catalog to select data to restore, you can choose specific instances of backed up data by using one of the data selectors shown in Table 6-1. The data selector describes, either explicitly or by inference, the identity of each backup image section containing the data of interest.
Table 6-1 Data Selectors
Selector | Description |
---|---|
|
Shows the most recent backup instance of an object |
|
Shows the first backup instance of an object |
|
Shows all backup instances of an object |
backup-id |
Shows the instance contained in the backup section identified by the backup ID. Within a backup catalog, Oracle Secure Backup identifies each backup image section with a numeric backup ID. It assigns backup IDs without regard to the time order of backups. For example, backup ID |
date-time |
Shows the most recent backup instance of an object backed up on or before the given date-time |
date-time range |
Shows all file-system objects backed up only during the date-time range specified |
When applied to a file-system object, a data selector yields the identity of zero or more backup image sections in which the file-system object is stored.
See Also:
Oracle Secure Backup Reference for the use of data selectors in the find
command
"Example: Usage of Oracle Secure Backup Data Selectors"
"About Backup Image Instances and Tape Volumes" for more information about backup image instances and backup sections
As an example of how Oracle Secure Backup applies data selectors to specific instances of backed up data, consider a directory called /numbers
that you back up fully on each of three days at the beginning of May. The contents of /numbers
changes each day.
Table 6-2 shows the files that are backed up and the volume and backup image file to which they are written. The May 1 and May 2 backups were written to volume FULL-02
. The May 3 backup filled volume FULL-03
while writing file2.dat
. Oracle Secure Backup continued the May 3 backup on volume FULL-04
by writing the remainder of file2.dat
, followed by file4.dat
.
Table 6-2 Backup of the /numbers Directory
Date | Contents of /numbers | Backup volume and image | Backup ID |
---|---|---|---|
5/1/09 |
file1.dat file2.dat file3.dat |
volume FULL-02, file 5 |
20 |
5/2/09 |
file2.dat file3.dat |
volume FULL-02, file 9 |
30 |
5/3/09 |
file1.dat file2.dat |
volume FULL-03, file 3, section 1 |
40 |
5/3/09 (continued) |
file2.dat file4.dat |
volume FULL-04, file 3, section 2 |
46 |
Table 6-3 describes the effect of various data selectors on the file-system object references.
Table 6-3 Data Selectors for Backups of the /numbers Directory
Data Selector | Object Reference | Backup Image Sections Selected (Backup IDs) |
---|---|---|
latest |
|
FULL-04, file 3, section 2 (46) |
latest |
|
FULL-03, file 3, section 1 (40) and FULL-04, file 3, section 2 (46) |
latest |
|
FULL-03, file 3, section 1 (40) and FULL-04, file 3, section 2 (46) |
earliest |
|
FULL-02, file 5 (20) |
earliest |
|
FULL-02, file 5 (20) |
all |
|
FULL-02, file 5 (20) and FULL-02, file 9 (30) and FULL-03, file 3, section 1 (40) and FULL-03, file 3, section 2 (46) |
all |
|
FULL-02, file 5 (20) and FULL-03, file 3, section 1 (40) |
20,30 |
|
FULL-02, file 5, section 1 (20) |
20, 30 |
|
FULL-02, file 5 (20) and FULL-02, file 9 (30) |
05/09 |
|
(none) |
05/09 |
|
FULL-02, file 9 (30) |
05/04-05/09 |
|
(none) |
05/04-05/09 |
|
FULL-02, file 5 (20) |
05/04-05/09 |
|
FULL-02, file 5 (20) and FULL-02, file 9 (30) |
Oracle Secure Backup consults the view mode each time it searches or displays a catalog directory. You control the view mode setting from the Oracle Secure Backup Web tool or command-line interface. There are three view modes:
Inclusive
When you browse a directory in inclusive mode, Oracle Secure Backup displays the name of every file-system object backed up from the directory. The data selector is ignored. For example, a listing of the /numbers
directory in Table 6-2 in inclusive mode displays file1.dat
, file2.dat
, file3.dat
, and file4.dat
.
This display behavior assumes the that you did not do the following:
Overwrite either backup image
Manually clean up the backup catalog
Explicitly direct Oracle Secure Backup to retire any backup catalog data
Exact
When you browse a directory in exact mode, you display only the contents of a directory identified by a data selector, from the path that contains the backup specified. You can browse in this mode only if you are in the exact directory that contains the required backup entry. If you set the view mode to exact, then the latest
setting in Table 6-3 would display only file1.dat
, file2.dat
, and file4.dat
only if you are currently browsing the /numbers
directory.
Specific
When you browse a directory in specific view mode, you display only the contents of a directory identified by the data selector. You can browse in this mode from the path that contains the backup entry or from a parent path. When no data selector is specified, inclusive view mode and specific view mode have the same output. If you set up the view mode to specific, and choose backup ids 20
and 40
as the data selectors, then the listing of the /numbers
directory in Table 6-2 would display file1.dat
, file2.dat
, and file3.dat
.
Oracle Secure Backup enables you to search for selected files and directories within the backup catalog. You can search for a specific backup entry from a given path by providing relevant information. The find
command allows searching for multiple entries with the use of Oracle Secure Backup wildcard pattern matching. Table 6-4 explains wildcard pattern matching with a few examples.
Table 6-4 Oracle Secure Backup Wildcard Pattern Matching
Pattern | Output |
---|---|
|
Matches zero or more characters in a string of characters. For example, pattern |
|
Matches exactly one character. For example, pattern |
|
Matches exactly one character in the given range. For example, |
|
Matches any character that is not mentioned inside For example, |
|
Matches exactly one character listed within For example, pattern |
Note:
Some wildcard patterns hold a different, specific meaning on certain platforms. To avoid overlap and to perform restore successfully, these special characters must be escaped while using wildcard pattern matching with obtool
. On Unix, use '\' as an escape character for '*'. On Windows, use '^' as an escape character for '*'.
About Filter Options Used for Wildcard Pattern Matching
You can use the following options to filter your output while using the find
obtool command or while using the find option on the Browse Catalog page while accessing the Oracle Secure Backup web tool:
You can perform the find operation on a single host or multiple hosts: the find option searches the catalog for each specified host. Oracle Secure Backup performs the search operation on a host depending on the following factors:
If the user specifies the hostname, then the given hostname is selected overriding other settings. Multiple host names can be specified as a comma separated list.
If the user does not provide the hostname but adds the current host option, the results for the current host are displayed.
If user neither provides the hostname nor provides the current host option, then the host set in the variable host setting is selected.
If none of the above conditions are met, an error is displayed.
The find option searches for the path of the given file or directory based on the specified data selector. The default data selector is latest
. For detailed information about data selectors, see "Catalog Data Selectors".
The find option enables you to search for backup entries by using the path that contains the required file or directory. The following criteria is used in selecting the path while performing the find operation:
If the user provides the pathname then search would begin from the given path.
If the user does not provide the pathname and chooses the current path in a directory, then this particular path is considered.
If the none of the above conditions are met, then an error is displayed.
Note:
Oracle Secure Backup wildcard pattern matching is not supported for path names.
The Backup Catalog contains information about all files and directories that have been backed up using Oracle Secure Backup. In certain cases, you may want to search for a particular file or directory. To help you obtain the required backup, the find option lets you choose the type of entry, file or directory, while browsing the catalog. By default, Oracle Secure Backup lists both files and directories.
You can filter the catalog content by providing the volume that contains the required backup. A file or directory can be backed up to many volumes. A comma-separated list of multiple volumes can be specified.
The find option supports searching across disk pools. A comma-separated list of disk pools can be provided to customize the output of the search operation.
See Also:
Oracle Secure Backup Reference for the usage and examples of the find
command
This section describes how to create a restore request by browsing a backup catalog.
This section contains the following topics:
This section outlines the steps to perform a catalog-based restore of file-system objects that were backed up using Oracle Secure Backup.
To perform a catalog-based restore, create a file-system restore job using the following steps:
To display the Backup Catalog page:
To browse the catalog and designate specific data to restore:
Perform the procedure in "Displaying the Backup Catalog Page".
The Restore: Backup Catalog page appears.
Select one or more data selectors in the Data Selector list.
See Also:
Select a host name from the Host Name list.
The host should be the one on which data was originally backed up.
Specify the Oracle Secure Backup browse options like hostname, view mode, list options, and browse path.
See Also:
"Specifying the Backup Catalog Browse Options" for information on how to specify the browse options.
Specify the Oracle Secure Backup search options, if you are looking for the contents of a particular backup.
See Also:
"Specifying the Backup Catalog Search Options" for information on how to specify the browse options.
You can change the data selector settings and the view mode settings by adjusting the respective field selections before clicking Browse or Search.
To create a catalog-based restore request:
Follow the steps in "Browsing the Backup Catalog Page".
Select the name of each file-system object you want to restore.
By performing this action, you are requesting that Oracle Secure Backup restore each instance of the object identified by the data selector. To learn the identity of those instances, click the adjacent properties button view to display the object's properties page. When you are done viewing the page, click Close.
Click Add.
Note:
You must click Add before leaving the page containing your selections. If you do not, then Oracle Secure Backup discards those selections.
The New Restore page appears.
The original path name of each object you previously selected appears in the lower left portion of this page. To its right is a text box in which you can enter the alternate path name. If you leave this box blank, then Oracle Secure Backup restores the data to its original path.
Note:
Some NAS data servers, including Network Appliance's Data ONTAP, limit your ability to rename restored data. If you try to violate that constraint, then the restore job fails.
Optionally, select Device to specify a backup container to use to perform the restore operation.
By default, Oracle Secure Backup automatically selects the best tape drive.
In Privileged restore, select Yes or No.
An unprivileged restore runs under your Linux or UNIX user or Windows account as configured in your Oracle Secure Backup user profile. Your access to file-system data is constrained by the rights of the account having that identity. Unprivileged mode is the default.
A privileged restore job runs under the root
user identity on Linux and UNIX systems. On Windows systems, the job runs under the same account identity as the Oracle Secure Backup service on the Windows client.
See Also:
In Priority, enter a priority or accept the default value of 100
.
The priority for a job is a positive numeric value. The lower the value, the greater the priority assigned to the job by the scheduler. For example, priority 20 jobs are higher priority than priority 100 jobs. The scheduler dispatches higher over lower priority jobs, providing all resources required to run the job are available.
Optionally, in Restore options, enter one or more obtar
options.
For example, -J
enables debug output and provides a high level of detail in restore transcripts.
See Also:
Oracle Secure Backup Reference for a summary of obtar
options
Select No high speed positioning if you do not want to use available position data to speed the restore.
Select NDMP incremental restore to direct Network Attached Storage (NAS) data servers to apply incremental restore rules.
This option applies only to NAS data servers that implement this feature. This option does not apply to a file-system backup created with obtar
.
Restore operations are usually additive. Each file and directory restored from a full backup or an incremental backup is added to its destination directory. If files have been added to a directory since the most recent Oracle Secure Backup backup, then a restore operation does not remove the newly added files.
When you select NDMP incremental restore, NAS data servers restore each directory to its state in the last incremental backup image instance applied during the restore job. Files that were deleted before the last incremental backup are deleted by the NAS data service when restoring this incremental backup.
For example, assume you make an incremental backup of /home
, which contains file1
and file2
. You delete file1
and make another incremental backup of /home
. After an ordinary restore of /home
, the directory would contain file1
and file2
; after an NDMP incremental restore of /home
, the directory would contain only file2
.
Select one of the following:
Replace existing files
This option overwrites any existing files with those restored from the backup image instance.
Keep existing files
This option keeps any existing files instead of overwriting them with files from the backup image instance.
If you are restoring to a Windows system, then select one of these:
Replace in use files
This option replaces in-use files with those from the backup image instance. Windows deletes each in-use file when the last user closes it.
Keep in use files
This option leaves any in-use Windows files unchanged.
In To host, select the host on which to restore the files, or accept the default.
Optionally, in Optional (For transient restores only), select Transient to restore backups encrypted by Oracle Secure Backup with a user-supplied one-time passphrase.
See "About Transient Backup Encryption" to learn about transient encrypted backups.
Optionally, click Preview.
The Preview page appears.
This page shows the files to be restored, the volume ID of the volume containing the backup, and the backup container in which the volume is located.
Optionally, in Preview click Recall.
The Recall page appears.
See "Recalling and Releasing Volumes" to learn how to recall volumes.
In the New Restore page, click OK.
Oracle Secure Backup displays the Browse Host page.
The restore request appears in the Restore items list. Oracle Secure Backup displays the message "Success: file(s) added to restore list" in the Status area.
To create additional catalog-based restore requests, return to "About Browsing the Oracle Secure Backup Catalog".
This section explains how to remove a catalog-based restore request that you have created, but have not yet sent to the scheduler.
To remove a catalog-based restore request:
Follow the steps in "Displaying the Backup Catalog Page".
On the Backup Catalog page, select a host from the Host Name list.
Click Browse Host.
Oracle Secure Backup displays the Browse Host page.
In the Restore items list, select the restore request you want to remove.
Click Remove.
Oracle Secure Backup redisplays the page. The restore request you selected no longer appears in the Restore items list.
To send catalog-based restore requests to the scheduler:
Follow the steps in "Displaying the Backup Catalog Page".
On the Backup Catalog page, select a host from the Host Name list.
Click Browse Host.
Oracle Secure Backup displays the Browse Host page.
Click Go.
The Oracle Secure Backup Web tool sends each restore request that appears in the Restore items list to the scheduler. A message appears in the Info bar for each request acknowledged by the scheduler. For example:
1 catalog restore request item submitted; job id is admin/240.
Oracle Secure Backup deletes each restore request upon its acceptance by the scheduler. As a result, the Restore items list is empty upon completion of the Go operation.
Display the transcript of the job to ensure that it completed successfully.
See Also:
To list all backups of a client host:
Follow the steps in "Browsing the Backup Catalog Page".
From the Backup Catalog page, select a host from the Host Name list box.
Click Browse Host.
Oracle Secure Backup displays the Browse Host page.
Click List Host Backups.
A properties page appears.
This section explains how to restore data without using a backup catalog.
This section contains the following topics:
The absolute path names of file-system objects you want to restore
You must know the path names for the files when they were backed up. If you do not know these path names, then you can use obtar -tvf
to find them or restore an entire backup image instance.
The identity of the backup container to which they were backed up
This can be a volume ID or a barcode.
To create a raw restore request:
Follow the steps "Displaying the Directly From Media Page".
On the Directly from Media page, click Add.
The Options page appears.
Select Device to specify a backup container for the restore operation.
This step is optional. By default, Oracle Secure Backup automatically selects the best tape drive.
Choose whether you want the restore to operate in unprivileged or privileged mode.
Unprivileged mode is the default.
Enter the backup image file number from which to restore data in the File Number text field.
See Also:
"About Volume Sets" to learn about file numbers
Do at least one of these:
Enter the first volume ID from which to begin data restore in the Volume ID(s) field
See Also:
"About Volume Sets" to learn about volume IDs
Enter the volume tag of the first volume from which to begin restoring in the Tag(s) text box.
A tag is a computer-readable barcode affixed to a volume.
See Also:
Enter one or more obtar
options in the Obtar option(s) box.
This step is optional.
See Also:
Oracle Secure Backup Reference for more information about obtar
Select NDMP incremental restore to direct certain NAS data servers to apply incremental restore rules.
Restore operations are usually additive. Each file and directory restored from a full or incremental backup is added to its destination directory. When you select NDMP incremental restore, NAS data servers that implement this feature restore each directory to its exact state as of the last incremental backup image applied during the restore job. Files that were deleted before the last incremental backup are deleted by the NAS data service upon restore of that incremental backup.
Select one of these:
Replace existing files
This option overwrites any existing files with those restored from the backup image instance.
Keep existing files
This option keeps any existing files instead of overwriting them with files from the backup image instance.
If you are restoring to a Windows system, then select one of these:
Replace in use files
This option replaces in-use files with those from the backup image instance. Windows deletes each in-use file when the last user closes it.
Keep in use files
This option leaves any in-use Windows files unchanged.
Select one of these:
All
This option restores the entire contents of the backup image file you selected.
File
This option restores a specific file or directory. If you select File, then enter the name of the file or directory to restore in the text box to the right of the File option.
If you know the position of the file in the backup image instance as reported previously by Oracle Secure Backup, then enter it in the Position field. If you do not, then leave this field blank.
Select a host to which to restore the data in the To host list.
Enter a path name in the Alternate path field to restore data using a different name than the one that was saved.
Suppose you want to restore the home directory for brhost2. The absolute path for the directory on the brhost2 file system was /export/home/brhost2
. To restore to an alternative directory, enter the alternative path and the desired final directory name. For example, you could restore /export/home/brhost2
to /tmp/brhost2-restored
.
The same technique works for individual files. For example, you could restore /export/home/brhost2/.cshrc
to /tmp/.cshrc-restored
.
Click OK to accept your selections or Cancel to discard them.
Oracle Secure Backup returns you to the Restore from Media page. If you clicked OK, then the raw restore request you just made appears in the list. Oracle Secure Backup displays the message, "Success: restore task created" in the Status area.
Use the following steps to perform a raw restore operation of file-system backup:
This section explains how to remove a raw restore request that you have created, but have not yet sent to the scheduler.
To remove a raw restore request:
Follow the steps in "Displaying the Directly From Media Page".
On the Directly from Media page, select the request to remove.
Click Remove.
Oracle Secure Backup redisplays the page. The restore request that you selected no longer appears in the list.
To send raw restore requests to the scheduler:
Follow the steps in "Displaying the Directly From Media Page".
On the Directly from Media page, click Go.
The Oracle Secure Backup Web tool sends each restore request that appears in the Restore from Media list box to the scheduler. A message appears in the status area for each request acknowledged by the scheduler. For example:
raw restore request 1 submitted; job id is admin/7.
Oracle Secure Backup deletes each restore request upon its acceptance by the scheduler. As a result, the Restore from Media list is empty upon completion of the Go operation.
Display the transcript of the job to ensure that it completed successfully.
See Also: