Forum Discussion

sistemasHFF's avatar
5 years ago

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

  • sistemasHFF's avatar
    sistemasHFF
    5 years ago

    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.

8 Replies

  • 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

    • sistemasHFF's avatar
      sistemasHFF
      Level 3

      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.

       

      • Michal_Mikulik1's avatar
        Michal_Mikulik1
        Moderator

        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