In the message dated: Thu, 13 Nov 2008 00:03:18 +0100, The pithy ruminations from Arno Lehmann on <Re: [Bacula-users] client list for restores sort order> were: => Hello, => => 11.11.2008 18:15, Bob Hetzel wrote: => > I've currently got over 150 backup clients installed with bacula so when => => > I want to do a restore and I have it list the clients by name the list => => > is rather unwieldy. I'm thinking the list is ordered by when they were => => > added?
I understand exactly what your describing. One of my pet-peeves with Bacula is the inconsistent interface...some commands accept an item number from a list, some accept client or pool name (without presenting a list), and lists aren't ordered. => > => => > If it's doing a database query to generate this client list, where can => => > the sort order be changed? Ideally I'd like to change it to order by => => > client name. => => This seems to be done in cats/sql_get.c function get_client_ids(). I'm => => not sure if simply adding an "ORDER BY" statement works with all => => databases if you order by a field not actually requested. => => Also, this could break existing scripts where you do something like => => echo 'status client => 1 => ' I use that kind of thing in scripts all the time. It's horrible, terrible, ugly, and difficult to support over time. Even worse is something like changing a volume from one pool to another... -------------------------------------------------- bconsole -c /usr/local/bacula/etc/bconsole.conf << E-O-COMMANDS update vol 1 11 $pool $mediaID Scratch update vol 1 1 4 $mediaID 7 14 -------------------------------------------------- In the first instance ($pool), the pool is specified by number, from a list. In the second instance (Scratch), it's given by name. The other items (1, 11, 1, 1, 4, 7, 14) are all from lists. Horrible to debug or document, and very easy to break. Tell me, quickly, what's does the 3rd instance of "1" mean there? I'd really like to see bacula support both the current style (as to not break too many scripts) and also support specifying items verbosely, so that the previous example would be written as: ------------------------------------------------------------------------- bconsole -c /usr/local/bacula/etc/bconsole.conf << E-O-COMMANDS update vol Volume parameters Pool Incremental $mediaID Scratch update vol Volume parameters Volume Status Scratch $mediaID Append Done ------------------------------------------------------------------------- It's not beautiful, but it's much easier to read, write, and debug, and it's resistent to future interface changes. Obviously, the same change would apply to the "query" command, which is even more likely to change as users write their own queries. => => so I would carefully consider such a change. => => Arno => => > Bob Mark ---- Mark Bergman voice: 215-662-7310 [EMAIL PROTECTED] fax: 215-614-0266 System Administrator Section of Biomedical Image Analysis Department of Radiology University of Pennsylvania PGP Key: https://www.rad.upenn.edu/sbia/bergman The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ------------------------------------------------------------------------- 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-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users