01-21-2011 08:14 AM
Solved! Go to Solution.
01-21-2011 09:01 PM
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:
http://www.symantec.com/docs/TECH21196
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 :
/C/marianne/j*/
/C/marianne/J*/
01-21-2011 08:27 AM
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:
filepath
Where filepath is the path to the file that you restore. For example:
/home
/etc
/var
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
01-21-2011 11:06 AM
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 ...
Thanks
@ I tried with the spaces but I have always the same error...
01-21-2011 11:44 AM
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' ?
01-21-2011 12:03 PM
-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
01-21-2011 12:57 PM
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
51 /BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL
only one file...
01-21-2011 01:09 PM
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?
01-21-2011 01:48 PM
I tried without length, but i have always the same error
but i don't understand the second part.
My files are
topolino.txt
/BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL ( in this case i tried only with a single file)
and pippo.txt
change /BDAREA_BCK/ARCHIVIO/ to /C/temp/CRSTD_BD/
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 ?
01-21-2011 01:51 PM
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.
01-21-2011 09:01 PM
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:
http://www.symantec.com/docs/TECH21196
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 :
/C/marianne/j*/
/C/marianne/J*/
01-22-2011 09:51 AM
Which result did not change - status 227 or invalid syntax ?
Have you added '-t 0' to bprestore command?
01-22-2011 10:50 AM
The result syntax error in ms shell and 227 in graphic interface.
Yes i used the -t 0 in the bprestore command...
01-22-2011 04:40 PM
I tried with this sintax in my pippo.txt file
rename 51 /BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL 47 /C/temp/CRSTD_BD/UDBDAD01.XBD.CSRTFID200810.DEL
and I used <CR> in the end,
my topolino.txt file is
/BDAREA_BCK/ARCHIVIO/UDBDAD01.XBD.CSRTFID200810.DEL
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
D01.XBD.CSRTFID200810.DEL
01-24-2011 12:55 AM
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
01-24-2011 01:54 AM
Hi,
because I must restore a lot of files ( about 500 ) from 2007 to 2010 and using gui interface all elaboration is very very difficult.
01-24-2011 04:57 AM
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.
01-24-2011 06:55 AM
In the last log I found this:
Restore started 01/24/2011 15:45:27
15:52:19 (3023753.xxx) INF - Status = no entity was found.
01-24-2011 11:01 AM
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.)
01-24-2011 12:02 PM
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
01-24-2011 12:34 PM
"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....)