/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 policy_type] [-p policy] [-s date] [-e
              date] [-w [hh:mm:ss]] [-k "keyword_phrase"] -f listfile | filenames


       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  directory  path  that  was  previously included in the restore by placing an
       exclamation mark (!) in front of the file or directory path (does not  apply  to
       NDMP  restores).  The  exclude capability is useful, for example, if you want to
       exclude part of a directory from the restore.

       Note: If a policy, schedule type, or date range is not specified then  bprestore
       will  start with the most recent full backup image and include all backup images
       that are newer. From these images the  most  recent  copy  of  a  file  will  be

       By  default,  you  are returned to the system prompt after bprestore is success-
       fully submitted. The command works in the background and does not return comple-
       tion  status  directly  to  you.  The -w option lets you change this behavior so
       bprestore works in the foreground and returns completion status after  a  speci-
       fied 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

       bprestore  overwrites any file of the same name that already exists on the local
       client disk, unless you include the -K option. It is also  possible  to  restore
       files that were backed up or archived on another client (-C option). You must be
       validated by the NetBackup administrator to restore from other clients.

       Use the bplist command to display information on the files and directories  that
       were backed up or archived.

       bprestore  writes  informative  and error messages to a progress-log file if you
       create the file prior to running 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   named
       /usr/openv/netbackup/logs/bprestore with  public-write  access.  bprestore  then
       creates an debug log file in this directory.

       In  addition,  if  a  nonroot  user  specifies  USEMAIL  = mail_address in their
       $HOME/bp.conf file, NetBackup sends mail on the  restore  completion  status  to
       mail_address. This message is sent when the restore process is complete.

       The following restrictions apply to bprestore:
       -drs      Allows  files  to  be  restored  without access-control attributes. By
                 default, access-control attributes are restored along  with  file  and
                 directory data. Option -drs is available only to NetBackup administra-

       -F file_options
                 Allows either Backup Exec files to be restored, or  both  Backup  Exec
                 and  NetBackup  files  to  be restored. The default ( -F is not speci-
                 fied), is to restore only NetBackup files.

                 To restore only Backup Exe files specify:

                 -F 524288

                 To restore Backup Exe and NetBackup files specify:

                 -F 1048576

       -K        Specifying this option causes bprestore to keep existing files  rather
                 than  writing  over  them when restoring files with the same name. The
                 default is to overwrite existing files.

       Note:     The -l | -H | -y options apply only when restoring  UNIX  files  to  a
                 UNIX system.

       -l | -H | -y
                 Specifying  -l  renames  the  targets  of  UNIX  links by using the -R
                 rename_file option in the same way as when renaming files.

                 Specifying -H renames UNIX hard links  by  using  the  -R  rename_file
                 option  in  the  same  way  as  when  renaming  files.  Soft links are

                 Specifying -y renames UNIX soft links  by  using  the  -R  rename_file
                 option  in  the  same  way  as  when  renaming  files.  Hard links are

                 See Example 5 in the EXAMPLES section.

       -r        Specifying this option restores raw partitions instead  of  file  sys-

       -L progress_log [-en]
                 Specifies  the  name  of  an  existing file in which to write progress

                 For example: /home/tlc/proglog

                 The default is to not use a progress log.

                 Include the -en option to generate a log in English. The name  of  the
                 log will contain the string _en. This option is useful to support per-
                 restore_filepath  string. The default is to restore using the original

                 For example, the following entry renames /usr/fred to /usr/fred2:

                 change /usr/fred to /usr/fred2

       -C client Specifies a client name to use for finding backups  or  archives  from
                 which  to  restore  files. This name must be as it appears in the Net-
                 Backup catalog. The default is the current client name.

       Note:     The destination client does not default to the source client. See  the
                 description for -D client option.

       -D client Specifies a destination client. This can be done by a root user on the
                 master server in order to direct the restored files to a machine other
                 than the client specified with the -C option.  The default is the cur-
                 rent client name.

       -S master_server
                 Specifies the name of the NetBackup server. The default is  the  first
                 server found in the /usr/openv/netbackup/bp.conf file.

       -t policy_type
                 Specifies  one  of  the  following numbers corresponding to the policy
                 type. The default is 0 for all clients except Windows  NT/2000,  where
                 the default is 13.

                 0 = Standard

                 4 = Oracle

                 6 = Informix-On-BAR

                 7 = Sybase

                 10 = NetWare

                 13 = MS-Windows-NT/2000

                 14 = OS/2

                 15 = MS-SQL-Server

                 16 = MS-Exchange-Server

                 19 = NDMP

       Note:     The  following policy types apply only to NetBackup Enterprise Server.

                 11 = DataTools-SQL-BackTrack

       -e date   Specifies  the start and end date range for the listing. The bprestore
                 command restores only files from backups  or  archives  that  occurred
                 within the specified start and end date range.

                 The format of date depends on the user's locale setting. See the NOTES
                 section for more information. For the C locale, the date syntax is  as

                 mm/dd/yy [hh[:mm[:ss]]]

                 -s  specifies  a start date and time for the restore window. bprestore
                 restores files only from backups or archives that occurred at or after
                 the specified date and time.

                 The  valid  range  of dates are from 01/01/1970 00:00:00 to 01/19/2038
                 03:14:07. The default start date is 01/01/1970 00:00:00.

                 The default is to return the most recent image. For backups,  this  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 will be restored.

                 -e  specifies  an  end date and time for the restore window. bprestore
                 restores only files in backups or 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). The bprestore com-
                 mand restores the file that has the specified backup date and time  or
                 the  file  that  is  the most recent backup preceding the end date and
                 time. The default is the current date and time."

       -T        Specifies a true-image restore, where only files and directories  that
                 existed  in  the  last  true-image backup are restored. This option is
                 useful only if true-image backups were performed. If  this  option  is
                 not  specified, all files and directories meeting the specified crite-
                 ria are restored, even if they were deleted.  When the  -T  option  is
                 specified,  the  image  requested  must be uniquely identified. Unique
                 identification is accomplished by using the -e  option   with  seconds
                 granularity.  The -s option, if any, is ignored. The seconds granular-
                 ity of an image can be retrieved by using the bplist command with  the
                 -l and -Listseconds options.

       -w [hh:mm:ss]
                 Causes  NetBackup  to  wait  for  a  completion status from the server
                 before returning you to the system prompt.  The date and  time  format
                 are  dependent  on  the  user's locale. See NOTES.  You can optionally
                 specify a wait time in hours, minutes, and seconds. The  maximum  wait
                 time  you can specify is 23:59:59. If the wait time expires before the
                 restore is complete, the command exits  with  a  timeout  status.  The
                 restore,  however, still completes on the server.  Specifying 0 or not

                 ? matches any single character.

                 [  ]  matches  one  of the sequence of characters specified within the

                 [ - ] matches one of the range of characters separated by the "-".

                 The keyword phrase can be up to 128 characters in length.  All  print-
                 able characters are permitted including space (" " ) and period (".").
                 The phrase must be enclosed in double quotes ("...") or single  quotes
                 (`...') to avoid conflict with the UNIX shell.

                 The default keyword phrase is the null (empty) string.

       -f listfile
                 Specifies  a file (listfile) containing 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  format  required  for  the file list depends on whether the files
                 have spaces or newlines in the names.

                 To restore files that do not have spaces or newlines in the names, use
                 this format:


                 Where  filepath  is  the  path to the file that you are restoring. For




                 To restore files that have spaces or newlines in the names, use one of
                 the following formats:

                 filepathlen filepath

                 filepathlen filepath start_date_time end_date_time

                 filepathlen filepath -s datetime -e datetime

                 The filepath is the path to the file you are restoring.

                 The filepathlen is the total number of characters in the file path.

                 The  start_date_time  and end_date_time are the decimal number of sec-
                 onds since 01/01/1970 00:00:00.
                 5 /home

                 4 /etc

                 4 /var

                 19 /home/abc/test file

                 12 !/etc/passwd

       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, following all
                 other options. You must also specify  absolute  file  paths.  You  can
                 exclude  a  file or directory path that was previously included in the
                 restore by placing an exclamation mark (!) in front  of  the  file  or
                 directory path (except when performing NDMP restores).


       The  format  that  you  must  use for date and time values in NetBackup commands
       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 bpbprestore usage statement output that shows the  -s,  -e,  and  -w

              [-s mm/dd/yyyy  [HH:MM:SS]] [-e mm/dd/yyyy  [HH:MM:SS]]
                    [-w [hh:mm:ss]]

       Note formats for the month, day, year and hours, minutes, seconds. These are for
       a locale setting of C, and may be different for other locales. For more informa-
       tion on locale, see the locale(1) man page for your system.


       Example 1

       To  restore  files from backups of /usr/user1/file1  that were performed between
       04/01/2003 06:00:00 and 04/10/2003 18:00:00, enter the  following  (all  on  one

              bprestore -s 04/01/2003 06:00:00 -e 04/10/2003 18:00:00 /usr/user1/file1

       Example 2

       To  restore  files  listed in a file named restore_list by using the most recent
       backups, enter the following:

              bprestore -f restore_list

       Example 3
              bprestore -k "*My Home Dir*" -C slater \
              -D slater -t 13 -L /home/kwc/bkup.log  /D

       Example 5

       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  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

       Example 6

       Assume  you  want  to  restore files from backups of /home/user1  that were per-
       formed between 04/01/01 06:00:00 and 04/10/01 18:00:00. You also want to exclude
       all  files  with a .pdf extension, except for the one named final_doc.pdf. To do
       this, run the following (all on one line, or using  the  backslash  continuation

              bprestore -s 04/01/01 06:00:00 -e 04/10/01 18:00:00 /home/user1 \
              !/home/user1/*.pdf /home/user1/final_doc.pdf





       bp(1), bparchive(1), bpbackup(1), bplist(1)


       Copyright 2002-2003 VERITAS Software Corporation. All rights reserved.

                           13 Jul 2003               bprestore(1)