cancel
Showing results for 
Search instead for 
Did you mean: 

bprestore

NIKHIL234656595
Level 6

 

 

sudo ./bprestore -C win23 -D win23  -R /tmp/dest_path -s 07/14/2012 -e 07/14/2012 /D/epo_Repository/epo46/Sitestat.xml   /D/temp/

 

When i run this above command i get the error,227 .

 

Please can anybody help what is the issue with this command.

 

I created a progress log file /tmp/dest_path but does not  insert anything in that file.

 

source server:win23

 

destination server:win23

 

source path: /D/epo_Repository/epo46/Sitestat.xml

 

destination path: /D/temp/

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

Possibly same issue here with bprestore?

Try specifying the policy type also in your command line

-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.

Looks like you're restoring for Windows client but via a *NIX server, therefore use the -t option to ensure it's using the correct default.

Also ensure that the client name in the command is as it appears in the NetBackup catalog (typos, FQDN etc).

Not sure whether your overall syntax is correct but it appears that initially it is not even finding what you want to restore

View solution in original post

18 REPLIES 18

Yogesh9881
Level 6
Accredited

try below.....

sudo ./bprestore -C win23 -D win23  -R /tmp/dest_path -s 07/12/2012 -e 07/15/2012 /D/epo_Repository/epo46/Sitestat.xml   /D/temp/

 

NIKHIL234656595
Level 6

/tmp/dest_path

 

What is the use of this progress file?Do we need to insert something in it?

mph999
Level 6
Employee Accredited

-R /tmp/dest_path  is the name of a file, that contains (for example ) this ...

change /netbackup/testdata to /tmp/res<CR>  (<CR> - Carriage return)

...So if my files wehere backed up from /netbackup/testdata, they would be restore to /tmp/res.
 
The line HAS to be exactly like I shoewd...  with the word change and the <CR> at the end.
 
What is the /D/temp at the end ?  Not sure this is needed.
 
Here is an example :
 
 
bprestore -s STARTDATE -S MASTER -C SOURCE_SERVER -D DESTINATION_SERVER -L LOGFILE  -R RENAMEFILE FILE_TO_RESTORE
 
Martin

NIKHIL234656595
Level 6

 

source path: /D/epo_Repository/epo46/Sitestat.xml

 

destination path: /D/temp/

 

i want to restore the file Sitestat.xml under d:\ drive in temp.

 

 

 

Marianne
Level 6
Partner    VIP    Accredited Certified

PLEASE read up in Command Ref Guide on bprestore command reference.

-R is rename file where you specify the source and destination (as per Martin's suggestion above).
-L is log file name.

Also verfy that the actual filename exist in backup set with bplist. See Command Ref guide for command usage.

mph999
Level 6
Employee Accredited

So I think you need this line :

 

change /D/epo_Repository/epo46/Sitestat.xml to /D/temp/<CR>

Where <CR> = Carriage return in the file   )

In the file /tmp/dest_path

Then use -R /tmp/dest_path  in the command.

Martin

Andy_Welburn
Level 6

Possibly same issue here with bprestore?

Try specifying the policy type also in your command line

-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.

Looks like you're restoring for Windows client but via a *NIX server, therefore use the -t option to ensure it's using the correct default.

Also ensure that the client name in the command is as it appears in the NetBackup catalog (typos, FQDN etc).

Not sure whether your overall syntax is correct but it appears that initially it is not even finding what you want to restore

NIKHIL234656595
Level 6

@Martin:Can you please tell me the complete command?

i have mentioned the below details.

server from which i want to restore:win23

 

 destination server on which i want this restore:win23

file which i want to restore is : /D/epo_Repository/epo46/Sitestat.xml

 

path on which i want to restore( destination path) /D/temp/

date: 16th july

.

 

Andy_Welburn
Level 6

capable of doing this yourself.

As far as I can remember I have *never* attempted a restore let alone a re-directed restore from the command line. But, with the excellent advice you have been given already, and a look at the man page for bprestore (*please* DO NOT ask what a man page is), it was no problem at all.

First off (suggested by Marianne) check to see that your file exists using the bplist command:

bplist  -C  win23  -t 13  -R 99  -s 07/15/2012  -e 07/16/2012  /

(this commmand may well give you a *lot* of output so replace the training "/" with "/D/epo_....etc..etc" i.e. the path to your file)

Create your rename file that you are going to use in your bprestore command as suggested by Martin

e.g. /tmp/rename which contains the line:

change  /D/epo_Repository/epo46/Sitestat.xml  to  /D/temp/Sitestat.xml

(ensure you hit return after entering this line!)

Run your bprestore (this command is all one line):

bprestore  -R /tmp/rename  -C win23  -D win23  -t 13  -s 07/15/2012  -e 07/16/2012  /D/epo_Repository/epo46/Sitestat.xml

 

There you go file restored to new location. Time for a coffee if that's ok?!

mph999
Level 6
Employee Accredited

As Andy says, try with the -t 13 option.

I tested the command on unix to unix, so didn't need it.

Thanks,

 

martin

NIKHIL234656595
Level 6

 

 cd /usr/openv/netbackup/bin

 sudo ./bprestore -s 07/24/2012 -S win23 -C winHust -D winHust  -L /tmp/res/restore_log.txt  -R /tmp/res/alt_loc -f /tmp/res/filelist

 

 win23]$ pwd

/tmp/res

]$ ls -ltr

total 12

-rwxrwxrwx 1 root root 39 Jul 29 08:14 filelist

-rwxrwxrwx 1 root root 50 Jul 29 08:19 alt_loc

-rwxrwxrwx 1 root root 96 Jul 29 08:24 restore_log.txt

 

$ cat filelist

/D/epo_Repository/epo46/Sitestat.xml

]$ cat alt_loc

change /D/epo_Repository/epo46  to /D/temp/<CR>

cat restore_log.txt

Restore started 07/29/2012 08:24:39

 

08:24:48 (432347.xxx) INF - Status = no entity was found.

still getting the error!!!!!!!!!!

 

 

Master server name :win23

client: winHust  

mph999
Level 6
Employee Accredited

In the alt_loc file you have an extra space after the word 'to'

change /D/epo_Repository/epo46  to /D/temp/<CR>

You must have a carriadge return at the end of this line as well.

Marianne
Level 6
Partner    VIP    Accredited Certified

Status 227 means:
For the criteria that you have specified, no backup can be found.

As suggested twice before - please use bplist check that files were actually backed up successfully on the client that you believe has backed up the file that you want to restore.

In your opening post, you have win23 as source and destination client:
  -C win23 -D win23 

In your last post, you have win23 as Master and  winHust as source and destination client:

-S win23 -C winHust -D winHust 

So: first of all - confirm correct hostnames for master and source client.
Then confirm policy type - if Windows policy and Unix/Linux master, you MUST add '-t 13'. The default on 
Unix/Linux master is -t 0 (Standard).

Before trying to restore, first verify backup with bplist:
On master:

bplist -C <client-name> -t <policy_type> -s 07/24/2012 -R 4 /D/epo_Repository/

(-R 4 will list up to 4 levels deep. Default is 99.)
 

CRZ
Level 6
Employee Accredited Certified

It should read

"change /D/epo_Repository/epo46 to /D/temp/"

(then hit the <Enter> or <Return> key to append the carriage return character)

Don't actually type "<CR>" on the end of your path.

mph999
Level 6
Employee Accredited

Thanks for pointing that out chris, reduce chance of mis-understanding

 

M

NIKHIL234656595
Level 6

 

$ cat filelist

/D/epo_Repository/epo46/Sitestat.xml

]$ cat alt_loc

change /D/epo_Repository/epo46  to /D/temp/<CR>

cat restore_log.txt

Restore started 07/29/2012 08:24:39

 

  1. file filelist should have complete path or only the file name?
  2. In the alt_loc file you have an extra space after the word 'to'

    change /D/epo_Repository/epo46  to /D/temp/<CR>

So above line should be:

change /D/epo_Repository/epo46  to/D/temp    ( here no space after to)

 

Should i proceed now?

 

 

mph999
Level 6
Employee Accredited

Sorry, I meant before 'to'

change /D/epo_Repository/epo46 to /D/temp

filelist should have the complete path.

 

M

NIKHIL234656595
Level 6

Hi Martin,

 

Still I am unable to restore .Please can you provide the example of a restore by bprestore.

and the output of each file using cat command.