Holger Mueller wrote:
> Hi,
>
> is it possible to modify the sql query to get alphabetical
> order of clients when selecting the most recent backup for a client?
>
> A patch for recent git version of bacula looks like this:
>
> ----8<------------
> diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c
> index 95dbf32..4e34e73 100644
> --- a/bacula/src/cats/sql_get.c
> +++ b/bacula/src/cats/sql_get.c
> @@ -568,7 +568,7 @@ int db_get_client_ids(JCR *jcr, B_DB *mdb, int
> *num_ids, uint32_t *ids[])
>
> db_lock(mdb);
> *ids = NULL;
> - Mmsg(mdb->cmd, "SELECT ClientId FROM Client");
> + Mmsg(mdb->cmd, "SELECT ClientId FROM Client ORDER BY Name");
> if (QUERY_DB(jcr, mdb, mdb->cmd)) {
> *num_ids = sql_num_rows(mdb);
> if (*num_ids > 0) {
> ----8<-----------
FWIW, I have often thought about having this. :)
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel