Forum Discussion

nbustarter380's avatar
9 years ago

Need command line Syntax to restore from one server to another

Hello,   I need to restore a folder and its contents from one server to another (located on the same master server) can anyone help with the correct syntax? Below is the information.   No...
  • I_De_Pedro's avatar
    9 years ago
    Hello!
     
    First check that you have permissions as it's indicated by StefanosM, take care with No.restrictions because it will do available Restore to any client, you can configure to restore to only that one.
     
     
    For change the destination client you should use:
     
    -D client

    Specifies a destination client. The default is the current client name.

    On UNIX systems, the master server root user can use this option to do the following: Direct restored files to a computer other than the client that the -C option specifies.

    On Windows systems, the master server administrator can use this option to do the following: Direct restored files to a computer other than the client that the -C option specifies.

     

    For different client:
    >bprestore -B -L <progress log> -C <sourceClient> -D <destinationClient> -R <RenameFileList> -f <RestoreFileList>

    Regards,
    Ignacio
  • Marianne's avatar
    9 years ago

    In addition to above excellent info, add '-s' for start date. Without -e (end-date) the current date will automatically be selected.

    -s 8/24/2015

    Create bprd log folder on the master server if it does not exist already.
    Restart NBU on master to enable this log.

    Other log folders:
    On media server: bptm and bpbrm (no restart needed)
    On destination client: bpcd and tar (no restart needed)

    Since you are having a problem with browsing in BAR GUI, you may want to check if bplist is working.

    On master: 
    bplist -C <source client> -s 8/24/2015 -R 4 /G/mjfage/_upload

     

  • I_De_Pedro's avatar
    9 years ago
    You’re welcome. All of that is explained in the first TN.
     
    As Marianne said, -s for dates.
     
    -R is for rename the path (onñy if you lije to do that), and –f is:
     
    -f listfile

    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 must be 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:

    filepath

    Where filepath is the path to the file that you restore. For example:

    Note: 

    For Windows systems, use upper case for the drive letter. For example, C:\NetBackup\Log1.

    UNIX systems:

    /home
    /etc
    /var

    Windows systems:

    C:\programs
    C:\winnt
    C:\documents\old_memos

    To restore the files that have spaces or new lines 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 restore.

    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 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 required date and time values format in NetBackup commands varies according to your locale. The /usr/openv/msg/.conf file (UNIX) and the install_path\VERITAS\msg\LC.CONF file (Windows) contain information such as the date-time formats for each supported locale. The files contain specific instructions on how to add or modify the list of supported locales and formats.

    See "About specifying the locale of the NetBackup installation" in the NetBackup Administrator's Guide, Volume II.

    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. This exclude option is not supported by NDMP restores and FlashBackup.

    The following is an example that uses filepathlen filepath:

    UNIX systems:

    5 /home
    4 /etc
    4 /var
    19 /home/abc/test file
    12 !/etc/passwd

    Windows systems:

    11 C:\programs
    8 C:\winnt
    22 C:\documents\old memos
    17 !C:\programs\test
    
    -f 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 of the command line after all other options. You must use absolute file paths. 

    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 pat. Exceptions: NDMP restores.

    For Windows systems, use upper case for the drive letter. For example, C:\NetBackup\log1.