02-25-2011 08:55 AM
Hey there,
I am new to Veritas and was wondering if someone could help me out with the syntax for a bprestore.
I am trying to restore an image on the same server to another drive.
I have my image being backed up to the h: drive. Other stuff is being backed up there but I just want the files starting with CSB1.
I want them being restored to the M:\backup drive and folder.
I tried this:
bprestore -K "*CSB1*" -C h: -D M:\backup
All it did was goto the command prompt, with no error, and not doing what I wanted.
Where am I going wrong here?
Thanks in advance for your help!
02-25-2011 12:11 PM
-K "*CSB1*" should be -k (little k) for keyword match
-C requires source clientname, not a path
-D requires destination clientname, not a path
If you are trying to restore same client, different directory, you need to use -R renamefile option
The contents of the renamefile are:
change sourcepath to destinationpath
02-25-2011 12:17 PM
-K is for keyword. If you did not add a keyword to the backup, you can't use it in a restore.
Have a look at this TN for bprestore options:
http://www.symantec.com/docs/TECH21196
You will need to provide the 'source path' for CSB1*, e.g D:\folderx\CSB1* in a file that we will use with the -f switch, then add source and destinatation folders in a text fille that we will refer to with -R switch.
Your command should be something like this:
C:\VERITAS\NetBackup\bin\bprestore -B -L C:\Temp\log.txt -R C:\Temp\restore -C <source-client> -D <destination-client> -t 13 -f C:\temp\restorefile1
(-C = source client, -D = destination client. can be omitted if you start the restore on the client)
C:\Temp\restore :
rename 11 /D/folderx/ 10 /M/backup/ (REMEMBER the <CR> at the end of the line!!!)
(the number before each path is the number of characters that follows. Note that D:\ must be defined as /D/)
C:\temp\restorefile1 :
/D/folderx/CSB1*
02-25-2011 12:19 PM
-C is for client - default is current clinet so don't need it
-D is for destination - default is current client do don't need it
-K is to say keep - meaning don't overwrite any files on disk. Looks like you are trying to use it as keyword but not right either - keywood is something you put in when you make the backup. where it looks like you are trying to state what files you want.
You want to restore all files that have CSB1 in their name.
I will admit I don't use the command line all the time so.... I don't think you can say
restore H:*CBS1* to M:\backup
you will need an input file
so using bplist you need to grep out the full path to all the files that have CBS1 in the name.
put them into a file and use the -f <filename> to tell it what files to restore. then use -R with a rename file to rename it from H:\file name to M:\backup\file name.
Or maybe someone knows a better way to do this.
Also as you are doing this at command line. not sure if you are doing it from the master or the client. If from the client - make sure they are allowed to do the restore.
02-25-2011 12:36 PM
this is one of those time where it might be easier to use the GUI
(and now that I re-read the OP, keyword option is not appropriate for filenames with CSB; it would be for policies with keyword CSB, so the -f filelist would be better choice, as Marianne says above)
02-25-2011 11:22 PM
restore's much easy with the Gui, but lemme check my ole notes for the bprestore command
08-20-2011 01:04 AM
Hi gmazza,
It's been close to 6 months that a number of forum members have been trying to assist.
Have you been able to get your bprestore command working?
Please let us know...