How to run bprestore from the command line to restore information to an alternate path and/or client

How to run bprestore from the command line to restore information to an alternate path and/or client

Article: 100010417
Last Published: 2013-10-24
Ratings: 4 7
Product(s): NetBackup

Problem

How to run bprestore from the command line to restore information to an alternate path and/or client.

 

Error Message

Multiple symptoms or issues may occur, such as the following...

When trying to restore via the Backup Archive and Restore Console (BAR GUI):
1. the BAR GUI appears hung, the loading cursor spins, and nothing appears to happen.
2. the BAR GUI crashes and the restore is unable to start or progress.

When trying to restore via the command line:
3. the restore appears to be using the wrong client's backup image, and/or the restore runs but reports The requested operation was partially successful (1).
4. the bprestore command is crashing.
5. the restore operation appears to be stuck.

 

Cause

Possible causes in which this could be due to...
1. The background application indicating OS cannot run application, some binary was 0kb file. (e.g. nbdevquery)
2. The large amount of files, millions of files, and/or lack of memory.
3. The syntax being incorrect
4. The rename file list being incorrect for CIFS backup path
5. There being hung allocations and non-whitelisted log path, cancel restore, clear allocation and use without -L option

 

Overview:

Provide detailed instructions on how to initiate a restore via the command line to an alternate client and/or location using the bprestore command. The command can be initiated from the client (destination), or from the master server.

The directory path to this command is:

UNIX/Linux: /usr/openv/netbackup/bin/
Windows: install_path\NetBackup\bin\

Syntax:

For same client:
bprestore -B -L progress_log -R rename_file -f listfile

For different client:
bprestore -B -L progress_log -C source_client -D destination_client -R rename_file -f listfile

Option Variables:

progress_log = location of the restore progress log including file name
rename_file = full path of a text file with rename instruction
listfile = list of file to be restored

Note: For the contents of the rename file, there must be one line entry for each file or directory to be renamed, and ensure each line ends with a return, as seen below.

Line 1: change original_file to new_file(return)
Line 2: (empty line)

Example:

To restore all files under D:\Projects to the same client at E:\RestoreFiles\.

  1. Create the rename_file, named rename.txt, located: C:\temp\rename.txt, put the following entry in the file:
    • change /D/Projects to /E/RestoreFiles/
       
      • Note: Ensure there is a 'return' above to start a new empty line.
  2. Create the restore listfile, named filelist.txt, located C:\temp\filelist.txt, put the following entry in the file:
    • /D/Projects
  3. From the client, run the restore command:
    • bprestore -L /C/temp/restore.log -R /C/rename.txt-f /C/filelist.txt

 

Solution

Possible options to resolve some of these issues...
1. Ensure there are no 0kb binary files.
2. Ensure there is sufficient memory allocated.
3. Ensure the syntax being utilized is correct, see examples above.
4. Ensure there are no grammatical or syntax errors in the rename file list.
5. Ensure paths are whitelisted, per Related Article, and there are no hung allocations. Alternatively, remove the -L option from the command.

See the Veritas NetBackup Commands Reference Guide for more information.

 

Was this content helpful?