Hello, This is a very good idea -- thanks for the patch and for sending in the GPL paperwork already :-)
On Friday 15 August 2008 14:00:12 Kjetil Torgrim Homme wrote: > I needed to restore a subset of some old backups. Restoring the full > backups would need a terabyte of temporary storage, which seemed a bit > wasteful (and inconvenient to get hold of) since the data I was > interested in took less than a gigabyte. > > Anyway -- I implemented a simple regex to filter the files to restore. > It works like this: > > Building directory tree for JobId(s) 28644 ... > There were no files inserted into the tree, so file selection > is not possible.Most likely your retention policy pruned the files > > Do you want to restore all the files? (yes|no): no > > Regexp matching files to restore? (empty to abort): ^/var/log > > The patch adds a new keyword to the bootstrap file, FilePattern, which > the storage daemon will apply to all files before deciding whether to > send the file over to the fd. The fd doesn't need any changes, btw. > > This is just a quick hack, and there is some polishing left to do: The code looks pretty clean and in the spirit of the current code ... :-) > > * Only available interactively in the specific case above, but > could be useful as an alternative/supplement to marking files and > directories manually. Yes, perhaps it is worth adding a new "main" restore menu item for this, as well as a command line keyword. > > * Can not be modified like the other job parameters. Well, virtually nothing in restore can be set by job parameters, so this is not a problem. > > * Bacula will complain that the number of restored files is > different from what it expected in the final report. Yes, perhaps when filepattern is specified we can disable the check ... > > * Documentation is not updated. That is always a problem. ---- The only thing I might be inclined to change is "FilePattern" to "FileRegex" which is a bit techie, but if we ever want to add wildcards there would be no confusion in adding a FileWildCard bsr command ... > > The patch is against revision 7469, which we are now running in > production (don't tell my boss ;-). I hope others will find it > useful. I have a feeling that a lot of people will find this useful. > > PS. Kern, the GPL paperwork is on its way to Switzerland. Many thanks. I'll study the code a bit and let you know when it is in the SVN. Kern ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel