Video Screencast Help

bprestore CLI command

Created: 21 Jan 2011 | 23 comments
Hi Everybody,

I have this problem. I trying to restore some file using bprestore CLI command line

The sintax is the follow:

bprestore -B -L c:\temp\log1.txt -C source_server -D destination server -s 11/30/2008 -e 12/04/2008 -R C:\temp\pippo.txt -f C:\temp\topolino.txt

where pippo.txt is:
change /path/path1/ to /C/temp/CRSTD_BD/

and topolino.txt is:


The result is
in the GUI : Exit Status: 227 (no entity was found)
in dos-shell is:
Invalid line length in line:
EXIT STATUS 144: invalid command usage

Source server is an AIX machine , destination server is a windows machine. I used the upper case for the driver letter ( for windows system)
If I try to restore only a single file ( for example XXX810.DEL ) the restore works fine. The problem occured when I use the -f option.
So where is the problem ?

Thanks in advance

Comments 23 CommentsJump to latest comment

Will Restore's picture

does your file list contain spaces?

-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

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




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 user’s locale affects how dates and time are specified. See NOTES.

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

The following is an example that uses filepathlen filepath:

5 /home

4 /etc

4 /var

19 /home/abc/test file

12 !/etc/passwd

Will Restore -- where there is a Will there is a way

spillo1981's picture

Thanks in advance for the answer.

Really I inserted the files without any spaces, but the problem is that I have the same problem also if  I insert only one file such as /path/path1/file810.DEL

Now I will try to insert space ...


@ I tried with the spaces but I have always the same error...

Will Restore's picture

You preceded the path with the number corresponding to length of the pathname (such as

19 /home/abc/test file) and it still says 'Invalid line length in line' ?

Will Restore -- where there is a Will there is a way

J.H Is gone's picture

-s  and -e needs date and time

# bprestore -s 04/01/10 06:00:00 -e 04/10/10 18:00:00 C:\user1\file1 

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

spillo1981's picture

I inserted the "number" lenght and time but the problem is still here..

This is my command

bprestore -B -L c:\temp\log1.txt -C source_host -D destination_host -s 11/30/2008 00:00:00 -e 12/04/2008 23:59:59 -R c:\temp\pippo.txt -f c:\temp\topolino.txt

Invalid line length in line:

EXIT STATUS 144: invalid command usage

topolino.txt is


only one file...

J.H Is gone's picture

it does not link the line length.

did you try it with just adding the time and not adding the line length.

Meaning going back to your files on you first attempt, and just add the time to your command.

I also wonder if your file has to have full path and file name.

the example in man page never shows just a path change but a whole path/file name change.

Have you tried that?

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

spillo1981's picture

I tried without length, but i have always the same error

but i don't understand the second part.

My files are


/BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL  ( in this case i tried only with a single file)

and pippo.txt


The command line is:

bprestore -B -L c:\temp\log1.txt -C source_client -D destination_client -s 11/30/2008 00:00:00 -e 12/04/2008 23:59:59 -R c:\temp\pippo.txt -f c:\temp\topolino.txt

Is pipp.txt wrong ?

J.H Is gone's picture

in the examples they always show

/path1/path2/filename  C:/temp/filename

you are only puting in the dir's

I would test using the dirs/filename   C:\dirs\filename

and see if that works.

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

Marianne's picture

First of all see why you're getting status 227 (no entity found).

If you run bplist, do you see folders/files as expected? e.g.
bplist -C <source_client>  -s 11/30/2008 -e 12/04/2008 -R 3 /

You seem to be restoring Unix data to Windows?
If that's the case, you will probably have to add '-t 1' to bplist and bprestore commands to specify Standard policy type. The default on a Windows master will probably be 13 (MS-Windows-NT) for policy type.

When bplist gives you the desired output, have a look this TN for bprestore cmd usage on Windows:

My personal experience when assisting a customer some time ago:

... cmd restore is NOT as simple as explained in the TechNote:

The RenameFile needs a <CR> at the end of the line!! If the <CR> is absent, the 'rename' does not work, and the data is restored to the original location.

This is what my commands/files looked like (we were restoring folders):

C:\VERITAS\NetBackup\bin\bprestore -B -L C:\Temp\log10.txt -R C:\Temp\restore -C jayaar -D jayaar -t 13  -f C:\temp\restorefile1

(-C = source client, e.g. FP02; -D = destination client, e.g FP04)

C:\Temp\restore :

rename 12 /C/marianne/ 13 /C/morejunk1/    (REMEMBER the <CR> at the end of the line!!!)

C:\temp\restorefile1 :


Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

I tried with this sintax in my pippo.txt file


and I used <CR> in the end,

my topolino.txt file is


but the result not changed.

With bplist command I have:

bplist -C client_name -t 0 -R -l -s 11/30/2008 00:00:00 -e 12/04/2008 23:59:59 /BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL

-rwxrwxrwx ududb     db2udbgr     53594114 Nov 27  51 BDAREA_BCK:\ARCHIVIO\UDBDA

Marianne's picture

Which result did not change - status 227 or invalid syntax ?

Have you added '-t 0' to bprestore command?

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

The result syntax error in ms shell and 227 in graphic interface.

Yes i used the -t 0 in the bprestore command...

Amit Karia's picture

First of all, why use command line at all, if gui is available.

Try to restore from interactive menu(with bp) command, it will allow you to choose options one by one and much easier

spillo1981's picture


because I must restore a lot of files ( about 500 ) from 2007 to 2010 and using gui interface all elaboration is very very difficult.

Marianne's picture

I will try to emulate your restore testing when I get a chance - hopefully later this week.

I think we can safely assume that the problem is with  -f listfile.

I remember the <CR> in the RenameFile being a show-stopper last time I tested bprestore from cmd (I see the TN has in the meantime been updated to include the need for <CR> in RenameFile). Maybe the same is needed after the last line in listfile?

Have you tried to see if there's more info in the logs? I would look at bprestore and bprd on Master (as a start) as well as the restore log specified with -L.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

In the last log I found this:

Restore started 01/24/2011 15:45:27

15:52:19 ( INF - Status = no entity was found.

Marianne's picture

Status 227 will be 'normal' if NBU is not reading/interpreting -f listfile correctly.

I'm curious to see what is passed to bprd as search criteria.

Do you have bprd log dir on the master? (If it does not exist, you will have to restart NBU on the master after creating it.)

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

bprd log

15:52:16.648 [7512.6664] <2> get_ccname: unable to get configured name: no entity was found (227)
15:52:16.648 [7512.6664] <2> adjust_clientname: adjusted clientname = usbckw601, client_bp_conf_name = usbckw601
15:52:16.648 [7512.6664] <2> process_request: requesting_clnt_hostname = ccname usbckw601
15:52:16.648 [7512.6664] <2> restorefiles:    mpx_restore_possible = 1
15:52:16.648 [7512.6664] <2> restorefiles:    browse_client = USBCDX601.USINET.IT
15:52:16.648 [7512.6664] <2> restorefiles:    requesting_client = usbckw601
15:52:16.648 [7512.6664] <2> restorefiles:    destination_client = USBCKW601.ESP.INTERNAL.USINET.IT
15:52:16.648 [7512.6664] <2> restorefiles:    requesting_client_hostname = usbckw601
15:52:16.648 [7512.6664] <2> restorefiles:    destination_client_hostname = USBCKW601.ESP.INTERNAL.USINET.IT
15:52:16.648 [7512.6664] <2> restorefiles:    requesting_user = root
15:52:16.648 [7512.6664] <2> restorefiles:    requesting_group = root
15:52:16.648 [7512.6664] <2> restorefiles:    progress_file = /c/temp/log2.txt
15:52:16.648 [7512.6664] <2> restorefiles:    rename_file = /C/temp/pippo.txt
15:52:16.648 [7512.6664] <2> restorefiles:    policy = NONE
15:52:16.648 [7512.6664] <2> restorefiles:    keyword =
15:52:16.648 [7512.6664] <2> restorefiles:    sched_type = 12
15:52:16.648 [7512.6664] <2> restorefiles:    keep = 0
15:52:16.648 [7512.6664] <2> restorefiles:    restore_retries = 0
15:52:16.648 [7512.6664] <2> restorefiles:    raw_restore = 0
15:52:16.648 [7512.6664] <2> restorefiles:    max_apollo_restore_arg_chars = 9000
15:52:16.648 [7512.6664] <2> restorefiles:    rename_linktos = 0
15:52:16.648 [7512.6664] <2> restorefiles:    client_type = 13
15:52:16.648 [7512.6664] <2> restorefiles:    rest_start_time = 1295880327
15:52:16.648 [7512.6664] <2> restorefiles:    cmd_start_date = 1227999600
15:52:16.648 [7512.6664] <2> restorefiles:    cmd_end_date = 1228431599
15:52:16.648 [7512.6664] <2> restorefiles:    unixtime = 1295880327
15:52:16.648 [7512.6664] <2> restorefiles:    timetype = 4
15:52:16.648 [7512.6664] <2> restorefiles:    user_interface = 0
15:52:16.648 [7512.6664] <2> restorefiles:    monitor_restore_job = 0
15:52:16.648 [7512.6664] <2> restorefiles:    restore_jobidstr = 3023753
15:52:16.648 [7512.6664] <2> restorefiles:    client_locales_available = 1
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_lc_messages = en
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_lc_time = en
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_lc_ctype = en
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_lc_collate = en
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_lc_numeric = en
15:52:16.648 [7512.6664] <2> restorefiles:    cverbose = 0
15:52:16.648 [7512.6664] <2> restorefiles:    true_image = 0
15:52:16.648 [7512.6664] <2> restorefiles:    restorable_format = 0
15:52:16.648 [7512.6664] <2> restorefiles:    bpcd_connect_opts = 16974338
15:52:16.648 [7512.6664] <2> restorefiles:    filesystem_only = 0
15:52:16.648 [7512.6664] <2> restorefiles:    clntuid = -1
15:52:16.648 [7512.6664] <2> restorefiles:    clntgid = -1
15:52:16.648 [7512.6664] <2> restorefiles:    acknowledge_status = 0
15:52:16.648 [7512.6664] <2> restorefiles:    keep_progress_log_open = 1
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_flops = 0
15:52:16.648 [7512.6664] <2> restorefiles:    proxy_copy = 0
15:52:16.648 [7512.6664] <2> restorefiles:    clnt_v2_1_or_later = 1
15:52:16.648 [7512.6664] <2> restorefiles:    commit = 0
15:52:16.648 [7512.6664] <2> restorefiles:    dirByteCount = 0
15:52:16.648 [7512.6664] <2> restorefiles:    tempDirectory = NULL
15:52:16.648 [7512.6664] <2> restorefiles:    mountDatabase = 0
15:52:16.648 [7512.6664] <2> restorefiles:    bePathByteCount = 0
15:52:16.648 [7512.6664] <2> restorefiles:    beRedirectionPath = NULL
15:52:16.648 [7512.6664] <2> restorefiles:    restore_sync_command = 0
15:52:16.648 [7512.6664] <2> restorefiles:    use_alt_buf = 0
15:52:16.648 [7512.6664] <2> restorefiles:    generate_english_logs = 0
15:52:16.648 [7512.6664] <2> restorefiles:    dont_restore_security = 0
15:52:16.648 [7512.6664] <2> restorefiles:    redirWebSrvrByteCount = 0
15:52:16.648 [7512.6664] <2> restorefiles:    redirWebSrvr = NULL
15:52:16.648 [7512.6664] <2> restorefiles:    granular_restore = 0
15:52:16.648 [7512.6664] <2> restorefiles:    alt_rest_copy_num = 0
15:52:16.648 [7512.6664] <2> restorefiles:    vm_opts = 0
15:52:16.648 [7512.6664] <2> restorefiles:    vm_server_string = NONE
15:52:16.648 [7512.6664] <2> restorefiles:    priority = -1
15:52:16.648 [7512.6664] <2> restorefiles:    disk_media_server = NONE
15:52:16.648 [7512.6664] <2> restorefiles:    spsrestoreoptions = 0
15:52:16.648 [7512.6664] <2> restorefiles:    vhd_file_name = NONE
15:52:16.648 [7512.6664] <2> restorefiles:    vhd_type = 0
15:52:16.648 [7512.6664] <2> restorefiles:    vhd_disk_size = 0
15:52:16.648 [7512.6664] <2> restorefiles:    vhd_delete_on_failure = 0
15:52:16.648 [7512.6664] <2> open_job_info_file: open restore job params

Marianne's picture

"15:52:16.648 [7512.6664] <2> restorefiles:    client_type = 13"

client_type = 13 = MS-Windows-NT

Did you remember to add '-t 0' to the bprestore command?

I'm also missing an entry for c:\temp\topolino.txt - seems it's totally ignored?

(I wish I had the time right now to test... My lab system is running Solaris - I will proof nothing if I get it to work there... Need to find a Windows server to install NBU master....)

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

I tried also with the -t 0 but the result never change.

In effect topolino.txt is missing although the command is present in my command line.

A corious test ... In Altpath log I saw a character and I inserted it in my pippo.txt file and the result is that the netbackup error goes in 50 .

The log is this

Restore started 01/25/2011 12:22:18

12:32:54 Status of restore from copy 1 of image created 12/02/2008 11:45:39 = client process aborted

12:32:54 The following files/folders were not restored:

12:32:55 ( INF - Status = client process aborted.

The character is in the last position.

spillo1981's picture

I resolved!!!

It is incredible. From a media server the bprestore cause the failure, but if i use the same command on master ( passive node or active node) the restore completed successfully.

Now I have another problem . I able to restore from the same machine ( in my case from source client AIX destination AIX command line from windows my master server) but If I try to restore from AIX to Windows ( commadn line from my master server)  the restore failure because the netbackup goes in "5" "No such file or directory"

bprestore -B -L c:\temp\log.txt -C AIX MACHINE -D WINDOWS MACHINE -t 0 -s 02/04/2008 -e 07/10/2010 -f c:\temp\topolino.txt -R C:\temp\pippo.txt

topolino.txt is




For me the problem is in the pippo.txt, probably from " to C/TEMP/RICCARDO/ " in the end there is <CR>

Marianne's picture

Thanks for the feedback - we obviously had NO IDEA that you were trying bprestore on a media server. Alternate client restore can only be done from the master. Even when it's done from a Media Server GUI or Admin Console, all actions, management, etc is running on the master server itself (Master name on the top left of the GUI).

I would've installed NBU master on a VM and do all testing there, using my laptop and Solaris machines as clients...

For latest restore failure, create tar log on Destination client. Also ensure that Altpath folder exists under netbackup\logs on Dest client.

Can you see in Activity Monitor or restore log that a connection is made to the Dest client?

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

spillo1981's picture

About my last problem...

Restore from aix server to windows server. If I use the virtual nome of cluster the restore works fine ( bprestore -D cluster node virtual) but if i use the "physical active node" the restore goes in error.

Another problem that i "resolved" is about the line feed at the end of -R option. I created this file ( pippo.txt) with notepad and for some reason the "special character" doesn't appears in the log file. ( under Altpath).

So now finally works fine... I don't believe...

Thanks to everybody for support...