cancel
Showing results for 
Search instead for 
Did you mean: 

Correct way of launching CLI bprestore command

AlejandroGG
Level 2

Hello!

Looks like I'm launching bprestore command on a non-correct way. I've browsed through the discussions and the kb's, but nothing comes to the solution unfortunately.

I'm running the following command:

./bprestore -copy 2 -C client1 -D client1 -K -print_jobid -priority 90000 -R rename-file /tmp/test_file

rename-file contents:

change /tmp/test_file to /tmp/test_file-recu

After launching the previous command and returning the jobid, it automatically ends under an Incomplete state in the Activity Monitor, and rc 2800:

14-jun-2018 10:26:21 - begin Restore
14-jun-2018 10:26:22 - end Restore; elapsed time 0:00:01
Standard policy restore error  (2800)

Could you tell me what's wrong with the way I'm launching this?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified
7 REPLIES 7

quebek
Moderator
Moderator
   VIP    Certified

Did not you forget about -t policy_type

are both source and dest client running the same OS?

Add -L progress_log to see more and remeber that -R rename_file (must be an absolute path) - so full path to rename file.

-t policy_type
Specifies one of the following numbers that corresponds to the policy type. The default is 0 for all clients except Windows, where the default is 13.

0 = Standard

8 = MS-SharePoint

13 = MS-Windows

16 = MS-Exchange-Server

19 = NDMP

20 = FlashBackup

21 = Split-Mirror

25 = Lotus-Notes

29 = FlashBackup-Windows

30 = Vault

35 = NBU-Catalog

38 = PureDisk-Export

39 = Enterprise-Vault

40 = VMware

41 = Hyper-V

 

Yeah. Both clients are the same - and therefore have the same OS.

It defaults to "0" (Standard), and it should be correct.

Also, -R is using absolute path.

Anyway, I've made the requested modifications: adding -t 0 and also adding -L for logging, and it comes with the same rc, but with more information:

14-jun-2018 10:43:11 - begin Restore
14-jun-2018 10:43:11 - Error bprd (pid=93148) Access to /home/user/test.log denied: The provided path is not whitelisted
14-jun-2018 10:43:11 - end Restore; elapsed time 0:00:00
Standard policy restore error  (2800)

/home/user/test.log contents:

$ cat test.log
 Restore Job Id=1195123
Restore started 06/14/2018 10:43:11

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hallo,

several notes:

- is /tmp/test_file file or folder? You can rename only folders during restore, not files

- use -L switch to log more detailed output

- last backup of /tmp/test_file - does it have copy 2?

- as for policy types mentioned in previous post, Standard is presumed (error 2800), so I guess it is not a problem

regards

Michal

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

OK, it is a log path whitelist problem, see https://www.veritas.com/support/en_US/article.000100775

Regards

Hello,

1. /tmp/test_file is a file, not a folder. Didn't knew that you could only rename folders - How to not overwrite the original file (if exists) during bprestore? - Aka, I want to restore file1 to file1-recu, and not overwrite file1

2. Check -L details on my previous answer :)

3. Yeah, everything has a copy 1 (disk) and copy 2 (tape1) and copy 3 (tape2)

4. Yup, confirmed that the policy is Standard - so there should be an issue with this.

Thanks!

I've tried to follow the guide you sent in your message, and here is the output:

$ cd /data/openv/netbackup/bin/admincmd/

$ ./bpsetconfig -h server.domain.xyz
bpsetconfig> BPCD_WHITELIST_PATH=/home/user
bpsetconfig>

Launched again the same command, and in the -L log turns out the real error:

 Restore Job Id=1195126
Restore started 06/14/2018 10:55:02

10:55:02 (1195126.xxx) /tmp/test_file -s 06/13/2018 23:55:18 -e 06/14/2018 10:55:02 - no files matched in the given date range

10:55:02 (1195126.xxx) INF - Status = Standard policy restore error.

Looks like the -s and -e flags are needed to be specifically defined when launching this command, otherwise it will take from n-1 day.

I'm gonna now try to make it work for the required time range.

Thanks!

Marianne
Level 6
Partner    VIP    Accredited Certified

bprestore -copy 2 -C client1 -D client1 -K -print_jobid -priority 90000 -R rename-file /tmp/test_file

-R rename_file 

Here rename_file  must be the name - yours is /tmp/test_file

Remove rename-file  from the command. 

bprestore -copy 2 -C client1 -D client1 -K -print_jobid -priority 90000 -R  /tmp/test_file