From: Kern S. <ke...@si...> - 2003-12-24 14:21:18
|
On Wed, 2003-12-17 at 11:50, Graham D. Purcocks wrote: > Kern >=20 > Pleased to see you back. >=20 > Thanks for the info. I'll give that a try and let you know. >=20 > I have a working web interface specifically for our use. In thats it not = a general web interface. > However, techniques within it are relevant to others. There are 2 problem= s I have found with > non-interactive restores. They have been in other emails but it makes sen= se to reiterate and keep it together. >=20 > In a nutshell. >=20 > 1. restore simply ignores the 'storage' keyword and always asks for the s= torage name is you have multiple > storage defined, which I do. Yes, in looking at the code: pretty stupid. In some error cases it uses the keyword, but in the normal case, it always prompts. I'll fix that. > 2. If a client has changed filesets, which happens often if you give the = laptop user the ability to change it! > Then restore asks which fileset to use. I don't see why this is necessary= . Given a full backup is made after > a fileset change (caveat being the bug about command driven filesets). Th= en. if you know when the full > backup was made relevant to the restore time then you know which fileset = was valid at that time. > So why ask for it? In fact, I don't know what effect giving a fileset whi= ch was not valid at that time would > have. The problem with FileSets is that if there are multiple ones, Bacula must select the correct one. The current implementation is not very user friendly because in my head I was slightly confused between different filesets and changed filesets. For different FileSets (i.e. base name different), Bacula must ask, but for changed FileSets (same base name, just perhaps modified one or more times), there really is no reason to ask the users. I'm going to modify the code to be based on the "base FileSet name" (i.e. the name that appears on the FileSet "Name" directive). If there is only one FileSet, there will be no need to prompt, if there are multiple ones, you will get a choice of the base names. Regards, Kern >=20 > So I actively parse the console output and respond with the last fileset = and correct storage. This works > fine as I only do current restores. >=20 > N.B. Reduced the email down a bit. >=20 > Graham >=20 > ----- Original Message -----=20 > From: "Kern Sibbald" <ke...@si...> > To: "Graham D. Purcocks" <gr...@ws...> > Cc: "Thiago Lima" <thi...@we...>; "'bacula-users'" <bacula-= us...@li...> > Sent: Wednesday, December 17, 2003 8:21 AM > Subject: Re: [Bacula-users] non-interactive restore >=20 >=20 > > On Wed, 2003-12-10 at 16:47, Graham D. Purcocks wrote: > > > Kern > > >=20 > > > Is there a shortcut to restore 'all' files or must you put all the fi= les in the file list. > > >=20 > > > e.g. > > >=20 > > > echo "restore client=3D<client> current all yes" | console > > >=20 > > > Graham > >=20 > > echo "restore client=3Dxxx select all run" | console > >=20 > > I've never tested the "run" keyword. > >=20 > > For examples of scripting console, download the "regress" project from > > the CVS or look at it using the CVS browser on SourceForge. Look in the > > directory "resgress/tests". > >=20 > > Some of the forms are old, for example, I don't think I use "run" yet, > > but rather submit a subsequent "yes" to kick off the restore job. I > > change these things as I see a need, so it is in a state of evolution, > > with the goal to have a single line be able to to any restore. > >=20 > > Regards, Kern > >=20 > > >=20 > > > ----- Original Message -----=20 > > > From: "Kern Sibbald" <ke...@si...> > > > To: "Thiago Lima" <thi...@we...> > > > Cc: "'bacula-users'" <bac...@li...> > > > Sent: Friday, December 05, 2003 7:40 PM > > > Subject: RE: [Bacula-users] non-interactive restore > > >=20 > > >=20 > > > > On Fri, 2003-12-05 at 19:45, Thiago Lima wrote: > > > > > Well, I think I'm going to get it working.=20 > > > > >=20 > > > > > Will run :=20 > > > > > echo 'restore client=3DFederic file=3D</tmp/list before=3D"YYYY-M= M-DD > > > > > HH:MM:SS" yes' |./console > > > >=20 > > > > I'm not 100% sure that the file=3D keyword allows specification of = a list. > > > > Please try it. If it doesn't work, let me know and I'll either fix = it or > > > > add a "filelist" keyword. > > > >=20 > >=20 |