07-16-2012 10:54 PM
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/
Solved! Go to Solution.
07-17-2012 01:29 AM
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
07-16-2012 11:09 PM
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/
07-16-2012 11:16 PM
/tmp/dest_path
What is the use of this progress file?Do we need to insert something in it?
07-16-2012 11:28 PM
-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)
07-16-2012 11:35 PM
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.
07-16-2012 11:51 PM
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.
07-17-2012 12:13 AM
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
07-17-2012 01:29 AM
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
07-18-2012 11:23 PM
@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
.
07-19-2012 02:14 AM
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?!
07-19-2012 03:36 AM
As Andy says, try with the -t 13 option.
I tested the command on unix to unix, so didn't need it.
Thanks,
martin
07-29-2012 10:20 AM
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
07-29-2012 11:13 AM
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.
07-29-2012 12:49 PM
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.)
07-30-2012 12:27 PM
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.
07-30-2012 12:48 PM
Thanks for pointing that out chris, reduce chance of mis-understanding
M
08-06-2012 11:38 PM
$ 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
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?
08-07-2012 12:16 AM
Sorry, I meant before 'to'
change /D/epo_Repository/epo46 to /D/temp
filelist should have the complete path.
M
08-23-2012 09:04 AM
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.