cancel
Showing results for 
Search instead for 
Did you mean: 

bprestore cli syntax for alternate location [NBU 656 WIN2003]

JLTrommel
Level 2

Hello,

Who can tell me why I get error 5 when running this command ?

g:\veritas\NetBackup\bin\bprestore.exe   -B -L c:\TEMP\progress_2012041819095077.log -R c:\TEMP\renamefile.txt -s 01/07/2012 02:55:23 -e 01/09/2012 17:55:23 -f c:\TEMP\restorefilelist.txt

Where renamefile.txt contains f.i. (double quotes seem needed due to spaces in path) :

change "G:\old folder\file1.txt" to "G:\new folder\file1.txt"

and restorefilelist.txt contains f.i. :

"G:\old folder\file1.txt"

Both folders allready exist. Using Netbackup ES 6.5.6 and Windows 2003.

Thanks in advance !

Jan Trommel

 

 

6 REPLIES 6

JLTrommel
Level 2

I tried another unix-like syntax for the rename file and shortened it to only the part of the path that should change and made sure there was a newline at the end according to http://www.symantec.com/connect/forums/bprestore-command-line-options-windows-files and http://www.symantec.com/business/support/index?page=content&id=TECH21196 :

change /G/old folder/ to /G/new folder/

Still error 5 and no clue to what syntax error(s) I've made anywhere in the command and/or files.

Marianne
Level 6
Partner    VIP    Accredited Certified

I do not believe that double quotes is the answer. See Command usage TN: http://www.symantec.com/docs/HOWTO72681

When you restore to a Windows client, you can also use the following method for specifying entries in the rename file. (Do not use this method for other clients.)

rename bulength backup_filepath reslength restore_filepath

Where:

bulength is the number of ASCII characters in the backup path.

reslength is the number of ASCII characters in the restore path.

The first backup_filepath that is matched is replaced with the restore_filepath string.

For example, the following entry renames C:\fred.txt to C:\fred2.txt:

rename 11 /C/fred.txt 12 /C/fred2.txt

(Be sure to end the entry with a return.)

So, in your case, renamefile.txt should look like this:

line1: change 23 /G/old folder/file1.txt to 23 /G/new folder/file1.txt
line 2: (empty)

restorefilelist.txt should look like this:

23 G:\old folder\file1.txt

 

I have documented my own restore experience with bprestore here: https://www-secure.symantec.com/connect/forums/bprestore-cli-command#comment-5080921

 

PS: Status 5 is a generic restore error. Please see if there is anything more useful in Activity Monitor. Please also post c:\TEMP\progress_2012041819095077.log

 

 

 

JLTrommel
Level 2

Hello Marianne

Thanks very much for your reply, it was helpfull as were the technotes but I still don't have it working. I ran many variants of this command today :

g:\veritas\NetBackup\bin\bprestore.exe   -B -K -L  -R G:\SCRIPTS\INCIDENTAL-SCRIPTS\CLIRESTORES\TEST4\renamefile.txt -C nldcbfsr05 -D nldcbfsr05 -S nlavnbak02 -s 01/07/2012 02:55:23 -e 01/09/2012 17:55:23 -f G:\SCRIPTS\INCIDENTAL-SCRIPTS\CLIRESTORES\TEST4\restorefilelist.txt  

USING G:\SCRIPTS\INCIDENTAL-SCRIPTS\CLIRESTORES\TEST4\renamefile.txt (ends with CR):
rename 41 G:\avndfs001\Close Out\8) Geheel afgerond 36 G:\avndfs001\Close Out\RESTORE MAP 8
 

USING G:\SCRIPTS\INCIDENTAL-SCRIPTS\CLIRESTORES\TEST4\restorefilelist.txt :
241 /G/avndfs001/Close Out/8) Geheel afgerond/(*****)_1-13-2012 11-53-21Phase II Before Purge.eng

Which generates error 5 and this in the progresslog :

 -s 01/07/2012 02:55:23 -e 01/09/2012 17:55:23 - no files matched in the given date range

18:00:08 (1991296.xxx) INF - Status = the restore failed to recover the requested files.

when I use another line/filnepath in \restorefilelist.txt (i'm testing with 2 filenames out of hundreds) even generates error 144 probably because it contains a date in the filename ? (it shouldn't look there but only after -s and -e ) :

invalid date specified: /G/avndfs001/Close Out/8) Geheel afgerond/(*****)V6__3-23-2012 12-50-46Phase II Before Purge.eng for file /G/avndfs001/Close Out/8) Geheel afgerond/(****)_1-13-2012 11-53-21Phase II Before Purge.eng
199.
EXIT STATUS 144: invalid command usage

( Note filenames were partly hidden using ***** , they are much longer so the length numbers do match)

The -s date is from bplist, the -e is chosen as just a few days later.

I also look in G:\VERITAS\NetBackup\logs\bprestore - contains only <2> messages so still no clue to whats wrong. Jobs end with status 50 or 5 .

Any help is much appreciated !

regards, Jan Trommel

 

Marianne
Level 6
Partner    VIP    Accredited Certified

The following renamefile should look like this :

rename 41 /G/avndfs001/Close Out\8) Geheel afgerond to 36 /G/avndfs001/Close Out/RESTORE MAP 8

 -L needs to be followed by the name of the log file. You don't have anything following -L:

...\bprestore.exe   -B -K -L  -R G:\SCRIP.......

All I can suggest at this point is to ensure that bprd and bpdbm logs are enabled on the master server. (NBU needs to be restarted after these folders are created).

bprd will be the first log to have a look at - it will tell us how the requested restore path is interpreted.

PS:

Have you tried to list files before attempting the restore?

e.g.
bplist -t 13 -C nldcbfsr05 -s 01/07/2012 02:55:23 -e 01/09/2012 17:55:23 -R /G/avndfs001/

 

 

JLTrommel
Level 2

Hello Marianne

1) Regarding your post scriptum remark about bplist : there are indeed plenty of files to restore :

G:\SCRIPTS\INCIDENTAL-SCRIPTS\CLIRESTORES\TEST5>bplist -t 13 -C nldcbfsr05 -s 01/01/2012 -e 01/30/2012 17:55:23 -R "/G/avndfs001/" | find /c "." => still gives 50390 files

So I'm sure it must be possible to restore.

This is about 3000 GB which would take days to restore, so therefore I asked the user to limit his restore request, then he came with a list of 836 files out of these 50k. That's when I thought about using the CLI instead of the GUI which is slow enough for normal restores.

2) The -L option was in fact followed by a filename in the command that was executed, only missing in my attempt to log what I was doing. So that was just a cosmetical error.

3) The missing TO was something I had overlooked, so I added it to my "makerenamefile.cmd" script - which also calculates the filename-lengths and converts from windows g:\*\ to unix-like /G/*/ filepath-syntax (i'm not sure if that is needed).

4) This is what I see in \...\bprestore\[date].log so this seems to work (but still generates error 5)

15:22:03.865 [6292.3408] <2> logparams: -B -K -L G:\SCRIPTS(...)\progresslog_2012042415220380.txt -R G:\SCRIPTS\(...)\renamefile.txt -C nldcbfsr05 -D nldcbfsr05 -S nlavnbak02 -s 01/01/2012 -e 01/30/2012 -f G:\SCRIPTS\(...)\restorefilelist.txt

15:22:03.865 [6292.3408] <2> OV_SendProcessInfo2BPCD: Information - thread access token does not exist
15:22:03.865 [6292.3408] <2> OV_SendProcessInfo2BPCD: Information - About to write 7722 bytes to named pipe
15:22:04.193 [6292.3408] <2> OV_SendProcessInfo2BPCD: Information - successfully wrote information to named pipe
15:22:04.193 [6292.3408] <2> vnet_vnetd_service_socket: ..\libvlibs\vnet_vnetd.c.2048: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
15:22:04.193 [6292.3408] <2> vnet_vnetd_service_socket: ..\libvlibs\vnet_vnetd.c.2062: service: bprd
15:22:04.193 [6292.3408] <2> logconnections: BPRD CONNECT FROM 145.27.24.18.3592 TO 145.27.24.18.13724
15:22:24.724 [6292.3408] <2> g:\veritas\NetBackup\bin\bprestore.exe: (utf8_client_type) before MultiByteToWideChar >/G/avndfs001/Close Out/8) Geheel afgerond/11W(****)Purge.eng<
15:22:24.724 [6292.3408] <2> g:\veritas\NetBackup\bin\bprestore.exe: after  OVNameUnicode2UTF >/G/avndfs001/Close Out/8) Geheel afgerond/11W(****)Purge.eng<

BTW I used (****) and (...) just to shorten the clutter

5) Added bprd and bpdbm folders, did not need to restart services, logs are generated anyway, but contain no reference to this restore job

6) This command works fine, generates a lot of output : g:\veritas\NetBackup\bin\admincmd\bpimagelist -L -d 01/01/2012 -e 01/30/2012 -client nldcbfsr05 > bpimagelist.txt

7) This command works fine too : g:\veritas\NetBackup\bin\bplist.exe -t 13 -C nldcbfsr05 -s 01/01/2012 -e 01/30/2012 -R "/G/avndfs001/Close Out/" >bplist.txt

8) But these commands fail (note : I'm in a 100 % Windows environment) :

g:\veritas\NetBackup\bin\bplist.exe -t 13 -C nldcbfsr05 -s 01/01/2012 -e 01/30/2012 -R "G:\avndfs001\Close Out\"
g:\veritas\NetBackup\bin\bplist.exe -C nldcbfsr05 -s 01/01/2012 -e 01/30/2012 -R "G:\avndfs001\Close Out\"
=> both result in : EXIT STATUS 227: no entity was found

I'm sure there must be some stupid simple syntax error somewhere ... glad the user told me there's no hurry otherwise I would have used the GUI allready - but with so many files that's not what I'd prefer.

Any help still very much appreciated !

Best regards, Jan Trommel

Jan_Trommel
Not applicable

MORE BPRESTORE ERROR MESSAGES from recent restores :

BPLIST-CHECK : bplist -C nldcbfsr05 -t 13 -l -R -s 01/01/2011 "G:\avndfs001\Close Out\8) Geheel afgerond\KNURN1- 11X00083107Z2P\Workbook.docx"

BPLIST-CHECK-RESULT : -rwx------ root      root            32936 Nov 24 78 G:\avndfs001\Close Out\8) Geheel afgerond\KNURN1- 11X00083107Z2P\Workbook.docx


Command : g:\veritas\NetBackup\bin\bprestore.exe -L /G/BPRESTORE/Progress_log_10002.txt  -R /G/BPRESTORE/RENAMEFILE.TXT -C nldcbfsr05 -D nldcbfsr05 -t 13 -s 04/27/2012 -f /G/BPRESTORE/RESTOREFILE.TXT

RENAMEFILE.TXT : change 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx to 86 /G/RESTORE/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx

RESTOREFILE.TXT : 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx

Job overview : /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx

Detailed Status :

5/15/2012 5:16:57 PM - Warning bpbrm(pid=5848) expected start message from nldcbfsr05; read: ERR - error in rename line: change 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx to 86 /G/RESTORE/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx
5/15/2012 5:17:00 PM - Error bptm(pid=3592) The following files/folders were not restored:      
5/15/2012 5:17:01 PM - Error bptm(pid=3592) UTF - /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx     
5/15/2012 5:17:03 PM - restored image NLDCBFSR05_1335598261 - (tar received an invalid argument(181)); restore time 00:00:22
 

Progress_log_10002.txt :


17:16:41 (2019224.001) Restoring from image created 4/28/2012 9:31:01 AM
17:16:50 (2019224.001) INF - If Media id A00313 is not in a robotic library administrative interaction may be required to satisfy this mount request.
17:17:01 (2019224.001) The following files/folders were not restored:
17:17:02 (2019224.001) UTF - /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx
17:17:03 (2019224.001) Status of restore from image created 4/28/2012 9:31:01 AM = tar received an invalid argument

17:17:03 (2019224.xxx) INF - Status = the restore failed to recover the requested files.


ON CLIENT :

LOGS\ALTPATH :

change 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx to 86 /G/RESTORE/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx

TAR :

5:16:54.760 PM: [1948.2360] <4> ov_log::OVInit: INF - Starting log file: C:\Program Files\Veritas\NetBackup\logs\TAR\051512.LOG

(...)

Progress_log_10002.txt :


17:16:41 (2019224.001) Restoring from image created 4/28/2012 9:31:01 AM
17:16:50 (2019224.001) INF - If Media id A00313 is not in a robotic library administrative interaction may be required to satisfy this mount request.
17:17:01 (2019224.001) The following files/folders were not restored:
17:17:02 (2019224.001) UTF - /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx
17:17:03 (2019224.001) Status of restore from image created 4/28/2012 9:31:01 AM = tar received an invalid argument

17:17:03 (2019224.xxx) INF - Status = the restore failed to recover the requested files.


ON CLIENT : LOGS\ALTPATH :

change 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx to 86 /G/RESTORE/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx

ON CLIENT :TAR :

5:16:54.760 PM: [1948.2360] <4> ov_log::OVInit: INF - Starting log file: C:\Program Files\Veritas\NetBackup\logs\TAR\051512.LOG

(...)

5:16:55.618 PM: [1948.2360] <16> validName_Server2PC: Unable to open requested file: usr:\openv\netbackup\.rename.5848 (WIN32 22: The device does not recognize the command. )
5:16:55.618 PM: [1948.2360] <4> tar_process_restore_args: INF - changed name of file: /usr/openv/netbackup/.rename.5848 to file: C:\Program Files\Veritas\NetBackup\logs\ALTPATH\ALTPATH.016
(...)

5:16:57.381 PM: [1948.2360] <2> tar_base::V_vTarMsgW: ERR - error in rename line: change 78 /G/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx to 86 /G/RESTORE/avndfs001/Close Out/8) Geheel afgerond/KNURN1- 11X00083107Z2P/Workbook.docx
5:16:57.381 PM: [1948.2360] <2> tar_base::V_vTarMsgW: INF - EXIT STATUS 181: tar received an invalid argument
 

Please Advise

Regards, Jan Trommel