bprestore command with non english char (UTF-8)

Hi,

I need to restore many individual files (+3000), from different folders and the best way I have found was to use the command bprestore (from GUI it's almost an impossible task)

I was successful on using the command, but I am facing problems when the file name or folder have special char (Portuguese). When I am using the GUI I had not problems, but for this scenario it’s impossible to use the GUI. I already have a file list that I need to restore.

For example:

Trying to restore file: U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

---------------------------------------------------------------------------------------------------------------------

If I try from GUI its successful even thought if I look the TAR log I see that the name it’s not correct, but the file is restored correctly:

12:26:28.260 [7576.9696] <2> tar_base::V_vTarMsgM: TAR - U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

12:26:28.286 [7576.9696] <2> tar_base::V_vTarMsgM: CKP - 1429441.001 1578486388 0 0 0 1 0 T 90 /U/Users/ana/Downloads/Aquisição Urgente Março CIC nº8.xlsx

----------------------------------------------------------------------------------------------------------------------------------------------

If I try from the bprestore command:

bprestore -L "/C/Program Files/Veritas/NetBackup/logs/user_ops/_de/logs/restore_ana" -C U_SHARE -D wfps -f /C/temp/Test_res_ana/filelist.txt -t 13 -p MSWindows-FileShare-Users -M -print_jobid

I have the filelist.txt :

59 U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

----------------------------------------------------------------------------------------------------------------------------------------------------------

The command execution outputs an error:

Restore Job Id=1429444

invalid date specified: lsx for file U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx..

EXIT STATUS 144: invalid command usage

---------------------------------------------------------------------------------------------------------------------------------------------------------------

And the problem it’s not in the dates.. I have tried with dates and without. I believe the problem it’s because the file name it’s not correctly represented.

Because the GUI has not problems it’s possible the specify the LANG or something when executing the bprestore?

Do you have any recommendations?

Thank You

Tags (2)
1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

Re: bprestore command with non english char (UTF-8)

Well.. I have just figure it out. Michal_Mikulik1 led me to the correct path, but it was simpler than i thought and it was indeed related to the encoding.

I thought it needed to be UTF-8 but as i suspected bprestore it’s still a non-unicode app, so it needs the files / commands to be ANSI encoded.

I just converted the filelist.txt to ANSI encoding and now it run successfully.

Thanks everyone for your time to help me.

View solution in original post

8 Replies
Highlighted

Re: bprestore command with non english char (UTF-8)

Hello,

the cause will be in filelist.txt encoding format. it seems that the file name:

U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

is translated to

U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

thus counting 59 characters 3 chars earlier.

Regards

Michal

Highlighted

Re: bprestore command with non english char (UTF-8)

Hi,

filelist.txt it's saved with UTF-8 Encoding.

I tried to extend the length and now the restore starts.

But the problem is still present, because now there is no file with the name with the incorrect characters.

 

In filelist.txt i have changed length to:

63 U:\Users\ana\Downloads\Aquisição Urgente Março CIC nº8.xlsx

 

However, the restore fails:

14:40:04 (1429563.xxx) /U/Users/ana/Downloads/Aquisição Urgente Março CIC nº8.xlsx -s 10/27/2019 01:01:11 -e 01/08/2020 14:39:54 - no files matched in the given date range

14:40:12 (1429563.xxx) INF - Status = MS-Windows policy restore error.

 

Highlighted

Re: bprestore command with non english char (UTF-8)

Hello,

OS from which you run the bprestore is probably causing incorrect decoding (seems to Windows 1252). That's a problem  outside Netbackup.

Did you try to run bprestore directly from OS where data reside? I guess here it should not occur.

Regards

Michal

Highlighted

Re: bprestore command with non english char (UTF-8)

Yes, i am trying the restore from the client where the data resides.

If i open in the same session the Backup, Archive and Restore GUI, all file names appear with the correct format and the restore is successful.

The server regional settings appear to be correct.

It appears that only if i execute the command its as problems with encoding. The GUI does not execute the same command in the "background" ?

Highlighted

Re: bprestore command with non english char (UTF-8)

Do you know if the bprestore.exe is a Unicode application? Or it still is non-unicode legacy application.

Maybe this could be related to the code page that the bprestore.exe executes?

I checked and indeed the "ANSI Code page" setting (ACP) is set to 1252 in the server:

PS C:\Windows\system32> Get-WinSystemLocale | Select-Object Name, DisplayName,
>> @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } },
>> @{ n='ACP'; e={ $_.TextInfo.AnsiCodePage } };
>>

Name   DisplayName                  OEMCP   ACP
----        -----------                          -----          ---
pt-PT    Portuguese (Portugal)    850          1252

Highlighted

Re: bprestore command with non english char (UTF-8)


@sistemasHFF wrote:

Do you know if the bprestore.exe is a Unicode application? Or it still is non-unicode legacy application.

 


Good question.... probably legacy non-unicode.... 
I have over the years only seen that Veritas has made improvements to Java GUI w.r.t. fixes for non-english characters. 
https://www.veritas.com/support/en_US/article.100020876

We need someone from Veritas to answer.

Maybe good idea to log a Support call?

Highlighted

Re: bprestore command with non english char (UTF-8)

yeah, i remember in the past to have problems like that, but that as long been resolve in the GUI. Currently with GUI i have no problems restoring these files.. but with the number of files i need to restore it's almost impossible do it with the GUI. Using the bprestore was a very elegant solution to my situation, that fulfilled all my needs.

The support case it’s not possible currently because we are in the process of renovating the support contract. And this is something I need to complete asap.

I guess I will have to do an alternative root, where I restore everything (2 TB of data) to another location, and then I will use some copy tool like robocopy to restore the files I need.

Highlighted
Accepted Solution!

Re: bprestore command with non english char (UTF-8)

Well.. I have just figure it out. Michal_Mikulik1 led me to the correct path, but it was simpler than i thought and it was indeed related to the encoding.

I thought it needed to be UTF-8 but as i suspected bprestore it’s still a non-unicode app, so it needs the files / commands to be ANSI encoded.

I just converted the filelist.txt to ANSI encoding and now it run successfully.

Thanks everyone for your time to help me.

View solution in original post