/usr/openv/netbackup/bin/bprestore [-A | -B] [-drs] [-F file_options]
[-K] [-l | -H | -y] [-r] [-T] [-L progress_log [-en]] [-R
rename_file] [-C client] [-D client] [-S master_server] [-t pol-
icy_type] [-p policy] [-s date] [-e date] [-w [hh:mm:ss]] [-k
"keyword_phrase"] -f listfile | filenames [-cm] [-drs] [-md]
[-td temp_dir] [-spsredir_server hostname] [-BR portal_name |
teamsite_name] [copy -x]
bprestore lets users restore a backed up or archived file or list of
files. You can also name directories to restore. If you include a
directory name, bprestore restores all files and subdirectories of that
directory. You can exclude a file or a directory path that was previ-
ously included in the restore by placing an exclamation mark (!) in
front of the file or the directory path (does not apply to NDMP
restores). For example, the exclude capability is useful if you want to
exclude part of a directory from the restore.
Note If a policy, schedule type, or date range is not specified,
bprestore starts with the most recent full backup image. It
includes all subsequent incremental and differential backup
images. The most recent copy of a file is restored from these
By default, you are returned to the system prompt after bprestore is
successfully submitted. The command works in the background and does
not return completion status directly to you. The -w option lets you
change this behavior so bprestore works in the foreground and then
returns completion status after a specified time period.
The bprestore command restores the file from the most recent backups
within the time period you specify, except for a true-image restore.
(See the -T option description.)
bprestore overwrites any file of the same name that already exists on
the local client disk, unless you include the -K option. You also can
restore the files that were backed up or archived on another client (-C
option). To restore from other clients, the NetBackup administrator
must validate you.
bprestore writes informative and error messages to a progress-log file
if you do the following: create the file before you run the bprestore
command and then specify the file with the -L progress_log option. If
bprestore cannot restore the requested files or directories, you can
use the progress log to find the reason for the failure.
For detailed troubleshooting information, create a directory that is
named /usr/openv/netbackup/logs/bprestore with public-write access.
bprestore then creates a debug log file in this directory.
In addition, if a nonroot user specifies USEMAIL = mail_address in the
Use the bplist command to display information on the files and directo-
ries that were backed up or archived.
-A | -B Specifies whether to restore from archives (-A) or back-
ups (-B). The default is -B.
-BR portal_name | teamsite_name
Specifies a portal name or the team site name to where the
selected portal or team site is to be redirected in a Share-
Point farm. A user should specify the redirected portal or
team site as http://portalname | http://teamsitename, and
should already exist in a farm.
-cm Enables the restore operation to play through log files and
roll back any uncompleted transactions. Use this option if
your selection contains the last backup to be restored. If
this option is not selected, the database is left in an
intermediate state and is not yet usable.
-copy x Specifies the copy number to restore from. The user is able
to restore from a different copy than the primary copy. For
example, -copy 3 restores copy 3 of a file or list of files.
Alternatively, you may specify the copy from which to restore
at a global level (for all restore operations) by putting the
copy number into the file ALT_RESTORE_COPY_NUMBER.
Refer to the "Restoring from a specific backup copy" section
of the NetBackup Backup, Archive, and Restore Getting Started
Guide for a complete description.
-drs Restores the files without access-control attributes. By
default, access-control attributes are restored along with
file and directory data. Option -drs is available only to
Allows either Backup Exec files to be restored, or both
Backup Exec and NetBackup files to be restored. The default (
-F is not specified), is to restore only NetBackup files.
To restore only Backup Exe files specify:
To restore Backup Exe and NetBackup files specify:
rename_file option in the same way as when you rename files.
Soft links are unchanged.
Specify -y to rename UNIX soft links by using the -R
rename_file option in the same way as when you rename files.
Hard links are unchanged.
See Example 5 in the EXAMPLES section.
-md Mounts the database so that it is available to users.
This option is only available if Commit after restore com-
pletes is selected.
-r Specify this option to restore raw partitions instead of
-L progress_log [-en]
Specifies the name of an existing file in which to write
For example: /home/tlc/proglog
The default is not to use a progress log.
Include the -en option to generate a log in English. The name
of the log contains the string _en. This option is useful to
support any personnel that assist in a distributed environ-
ment where different locales may create logs of various lan-
Specifies the name of a file with name changes for alter-
Use the following form for entries in the rename file:
change backup_filepath to restore_filepath
The file paths must start with / (slash)
The first backup_filepath that is matched is replaced with
the restore_filepath string.
The default is to restore by using the original path.
For example, the following entry renames /usr/fred to
change /usr/fred to /usr/fred2
-C client Specifies a client name to use for finding backups
Specifies the name of the NetBackup server. The default is
the first server found in the /usr/openv/netbackup/bp.conf
This option specifies the Web server on which the redirected
portal or team site resides in a SharePoint farm. The redi-
rected Web server should be specified as hostname.
Specifies one of the following numbers that corresponds to
the policy type. The default is 0 for all clients except Win-
dows, where the default is 13.
0 = Standard
4 = Oracle
6 = Informix-On-BAR
7 = Sybase
8 = MS-SharePoint
10 = NetWare
13 = MS-Windows
14 = OS/2
15 = MS-SQL-Server
16 = MS-Exchange-Server
19 = NDMP Note that the following policy types apply only to
NetBackup Enterprise Server:
11 = DataTools-SQL-BackTrack
17 = SAP
18 = DB2
20 = FlashBackup
21 = Split-Mirror
22 = AFS
35 = NBU-Catalog
-s specifies a start date and time for the restore window.
bprestore restores files only from the backups or the
archives that occurred at or after the specified date and
The valid range of dates is from 01/01/1970 00:00:00 to
01/19/2038 03:14:07. The default start date is 01/01/1970
The default is to return the most recent image. For backups,
this image is the most recent full backup if a full backup
exists. If a full backup does not exist, then the most recent
incremental or user-directed backup is restored.
-e specifies an end date and time for the restore window.
bprestore restores only files in the backups or the archives
that occurred at or before the specified date and time. Use
the same format as for the start date and time.
The end backup date and time do not need to be exact, except
for a true-image restore (see the -T option description).
bprestore restores the file that has the specified backup
date and time. Or it restores the file that precedes the end
date and time, which is most recent backup. The default is
the current date and time.
This option provides a location where the associated log and
any patch files are to be kept until the database is
restored. If storage groups are restored, a subdirectory in
temp_dir is created for each storage group. The log and patch
files for each storage group are kept in the corresponding
The default location is /temp.
-T Specifies a true-image restore, where only the files and
the directories that existed in the last true-image backup
are restored. This option is useful only if true-image back-
ups were performed. If this option is not specified, all
files and directories that meet the specified criteria are
restored, even if they were deleted.
When the -T option is specified, the image that is requested
must be uniquely identified. Unique identification is accom-
plished by using the -e option with seconds granularity. The
-s option (if any) is ignored. The seconds granularity of an
image can be retrieved by using the bplist command with the
-l and -Listseconds options.
If you specify 0 or do not specify a time, the wait time is
indefinite for the completion status.
Specifies a keyword phrase for NetBackup to use when it
searches for backups or archives from which to restore files.
The phrase must match the one that was previously associated
with backup or archive by the -k option of the bpbackup or
the bparchive command.
Use this option in place of or in combination with the other
restore options to make it easier to restore your backups and
archives. The following meta characters can simplify the
match of keywords or parts of keywords in the phrase:
* matches any string of characters.
? matches any single character.
[ ] matches one of the sequence of characters that is speci-
fied within the brackets.
[ - ] matches one of the range of characters that the "-"
The keyword phrase can be up to 128 characters in length. All
printable characters are permitted including space (" " ) and
The phrase must be enclosed in double quotes ("...") or sin-
gle quotes (`...') to avoid conflict with the UNIX shell.
The default keyword phrase is the null (empty) string.
Specifies a file (listfile) that contains a list of files to
be restored and can be used instead of the filenames option.
In listfile, list each file path on a separate line.
The required format for the file list depends on whether the
files have spaces or newlines in the names.
To restore the files that do not have spaces or new lines in
the names, use this format:
Where filepath is the path to the file that you restore. For
The filepathlen is the total number of characters in the file
The start_date_time and end_date_time are the decimal number
of seconds since 01/01/1970 00:00:00.
datetime is the same as the command line (mm/dd/yy
[hh[:mm[:ss]]]). The command uses the start date, end date,
and time from the command line unless a line in listfile
overrides it. The dates may change from line to line.
The user's locale affects how dates and time are specified.
To exclude a file or a directory path that was previously
included in the restore, place an exclamation mark (!) in
front of the file or the directory path. (Exception: NDMP
The following is an example that uses filepathlen filepath:
19 /home/abc/test file
filenames Names one or more files to be restored and can be
used instead of the -f option.
Any files that you specify must be listed at the end, follow-
ing all other options. You must also specify absolute file
paths. To exclude a file or a directory path that was previ-
ously included in the restore, place an exclamation mark (!)
in front of the file or the directory pat. (Exception: NDMP
The format that you must use for date and time values in NetBackup com-
mands varies according to the locale setting.
If you are uncertain of the NetBackup command requirements for your
locale, enter the command with the -help option and check the usage.
The following is part of the bprestore usage statement output that
shows the -s, -e, and -w options:
[-s mm/dd/yyyy [HH:MM:SS]] [-e mm/dd/yyyy [HH:MM:SS]]
bprestore -s 04/01/2006 06:00:00 -e 04/10/2003 18:00:00 /usr/user1/file1
To restore the files that are listed in a file named restore_list by
using the most recent backups, enter the following:
bprestore -f restore_list
Restore directory /home/kwc from the backups that are associated with a
keyword phrase that contains "My Home Directory". Use a progress log
Enter the following (on one line):
bprestore -k "*My Home Directory*" -L /home/kwc/bkup.log /home/kwc
Restore the D drive on the Windows client slater from the backups that
are associated with a keyword phrase that contains "My Home Dir".
Use a progress log named /home/kwc/bkup.log.
Enter the following:
(Enter all on one line or use the backslash continuation character.)
bprestore -k "*My Home Dir*" -C slater \
-D slater -t 13 -L /home/kwc/bkup.log /D
Assume you have a rename file named /home/kwc/rename on a UNIX client
and it contains the following:
change /home/kwc/linkback to /home/kwc/linkback_alt
To restore the hard link that is named /home/kwc/linkback to alternate
path /home/kwc/linkback_alt on that client, run the following command:
bprestore -H -R /home/kwc/rename /home/kwc/linkback
Assume you want to restore files from backups of the file /home/user1.
The backups were performed between 04/01/06 06:00:00 and 04/10/06
18:00:00. You also want to exclude all files with a .pdf extension,
16 Feb 2007 bprestore(1)