SYNOPSIS

       /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 [-cm]
              [-drs]  [-md] [-td temp_dir] [-spsredir_server hostname] [-BR portal_name
              | teamsite_name]


DESCRIPTION

       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 subsequent ncremental and  differential  backup  images.  From  these
              images the most recent copy of a file will be restored.

       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
       description).

       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.

       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:

                 default is -B.

       -BR portal_name | teamsite_name
                 This  option specifies a portal nameor the team site name to where the
                 selected portal or teamsite is to be redirected in a SharePoint  farm.
                 A user should specify the redirected portal or teamsite as http://por-
                 talname | http://teamsitename, and should already exist in a farm.

       -cm       Use this option if your selection contains the last backup set  to  be
                 restored. This enables the restore operation to play through log files
                 and roll back any uncompleted transactions.  If  this  option  is  not
                 selected, the database is left in an intermediate state and is not yet
                 usable.

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

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

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

                 See Example 5 in the EXAMPLES section.

                 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-
                 sonnel assisting in a distributed environment where differing  locales
                 may create logs of various languages.

       -R rename_file
                 Specifies  the  name  of  a  file with name changes for alternate-path
                 restores.

                 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 using the original
                 path.

                 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.

       -spsredir_server hostname
                 This  option specifies the webserver on which the redirected portal or
                 team site resides in  a  sharepoint  farm.  The  redirected  webserver
                 should be specified as hostname.

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

                 0 = Standard

                 16 = MS-Exchange-Server

                 19 = NDMP

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

       -p policy Specifies the policy for which the backups or archives were performed.

       -s date

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

                 mm/dd/yyyy [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
                 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
                 specifying a time, means wait indefinitely for the completion  status.

       -k "keyword_phrase"
                 Specifies  a  keyword  phrase  for NetBackup to use when searching 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 bparchive command.

                 You can use this option in place of or in combination with  the  other
                 restore options in order to make it easier to restore your backups and
                 archives. The following meta  characters  can  simplify  the  task  of
                 matching keywords or parts of keywords in the phrase:

                 * matches any string of characters.

                 ? matches any single character.

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

                 [ - ] 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
                 /var

                 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.

                 datetime is the same as the command  line  (mm/dd/yy  [hh[:mm[:ss]]]).
                 The  start and end date and time specified on the command line is used
                 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. See NOTES.

                 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 following is an example that uses filepathlen filepath:

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


NOTES

       The  format  that  you  must  use for date and time values in NetBackup commands


EXAMPLES

       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
       line):

              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

       To restore the directory /home/kwc from the backups that are associated  with  a
       keyword  phrase  that  contains "My Home Directory" and use a progress log named
       /home/kwc/bkup.log, enter the following (all on one line):

              bprestore -k "*My Home Directory*" -L /home/kwc/bkup.log  /home/kwc

       Example 4

       To restore the D drive on the Windows client slater from the  backups  that  are
       associated  with a keyword phrase that contains "My Home Dir" and use a progress
       log named /home/kwc/bkup.log, enter the following (all on one line, or using the
       backslash continuation character):

              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
       Copyright (c) 2002-2005 VERITAS Software Corporation. All rights reserved.






                           13 Feb 2005               bprestore(1)