Re: [Bacula-users] print numbers without thousands separators

2017-10-07 Thread Bill Arlofski

I can't seem to find the email post right now, but I remember someone replying
that bconsole has a "gui on|off" command. If you enter "gui on", commas are no
longer printed in jobids, mediaids, files, bytes, nor the "expiresin" in the
list media outputs (possibly other places too?).

Also, the commands "tr -d ," and "sed 's/,//g'" work quite nicely in scripts
when piping commands to bconsole.


Best regards,

Bill

-- 
Bill Arlofski
http://www.revpol.com/bacula
-- Not responsible for anything below this line --

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-10-07 Thread Kern Sibbald

Hello,

We specifically implemented the Query command so that you could write 
your own queries to the database.  Unfortunately SQL database backends 
(MySQL, MariaDB, and PostgreSQL) all use different SQL commands in many 
cases, so you need to write your queries for a particular backend.


Bottom line: using a query command you can customize database queries to 
suit your particular needs.


Best regards,
Kern

On 22/09/2017 15:04, Christoph Litauer wrote:

Dear bacula users,

using bacula for many years without problems now. Great software!
One little thing would be nice:
In bconsole, querying e.g. "List alle backups for a client" results in

+-+---++---+-+--+---++
| jobid   | client| fileset| level | starttime   | 
jobfiles | jobbytes  | volumename |
+-+---++---+-+--+---++
| 821,494 | printhost | client files-to-backup | F | 2016-11-19 00:10:53 |  
222,727 | 5,945,291,349 | LTO6-012   |

As you can see, all numbers are printed using thousands separators. I think 
this is independent on the current locale (tried with C and en).
These numbers cannot be reused (by copy/paste) within bconsole or some other 
scripts without reformatting.
Selecting information using psql seems to ommit those separators.

Would be nice, if bconsole didn't print separators within numbers.

--
Kind regards
Christoph
_
Uni Koblenz, Computing Centre, Office A 022
Postfach 201602, 56016 Koblenz
Fon: +49 261 287-1311, Fax: -100 1311





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-25 Thread Christoph Litauer
Just what I wanted, thanks a lot!

> Am 25.09.2017 um 11:52 schrieb Radosław Korzeniewski 
> :
> 
> Hello,
> 
> 2017-09-23 19:06 GMT+02:00 Dimitri Maziuk :
> On 2017-09-23 07:04, Dan Langille wrote:
> 
> Why? Because nobody wants it enough.
> 
> 
> Well, there is a switch in bconsole: gui on which does what OP wants. Yes, it 
> is not permanent.
> 
> *list jobid=55177
> Automatically selected Catalog: Catalog
> Using Catalog "Catalog"
> ++---+-+--+---+--+--+---+
> | jobid  | name  | starttime   | type | level | jobfiles | 
> jobbytes | jobstatus |
> ++---+-+--+---+--+--+---+
> | 55,177 | SYS-Admin | 2017-09-25 06:56:14 | D|   |0 |
> 0 | T |
> ++---+-+--+---+--+--+---+
> *gui on
> *list jobid=55177
> ++---+-+--+---+--+--+---+
> | jobid  | name  | starttime   | type | level | jobfiles | 
> jobbytes | jobstatus |
> ++---+-+--+---+--+--+---+
> | 55177  | SYS-Admin | 2017-09-25 06:56:14 | D|   | 0| 0  
>   | T |
> ++---+-+--+---+--+--+---+
> 
> best regards
> -- 
> Radosław Korzeniewski
> rados...@korzeniewski.net
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


--
Freundliche Grüße
Christoph Litauer
_
Uni Koblenz, Rechenzentrum, Raum A 022
Postfach 201602, 56016 Koblenz 
Fon: +49 261 287-1311, Fax: -100 1311






--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-25 Thread Radosław Korzeniewski
Hello,

2017-09-23 19:06 GMT+02:00 Dimitri Maziuk :

> On 2017-09-23 07:04, Dan Langille wrote:
>
> Why? Because nobody wants it enough.
>>
>
>
Well, there is a switch in bconsole: gui on which does what OP wants. Yes,
it is not permanent.

*list jobid=55177
Automatically selected Catalog: Catalog
Using Catalog "Catalog"
++---+-+--+---+--+--+---+
| jobid  | name  | starttime   | type | level | jobfiles |
jobbytes | jobstatus |
++---+-+--+---+--+--+---+
| 55,177 | SYS-Admin | 2017-09-25 06:56:14 | D|   |0 |
   0 | T |
++---+-+--+---+--+--+---+
*gui on
*list jobid=55177
++---+-+--+---+--+--+---+
| jobid  | name  | starttime   | type | level | jobfiles |
jobbytes | jobstatus |
++---+-+--+---+--+--+---+
| 55177  | SYS-Admin | 2017-09-25 06:56:14 | D|   | 0| 0
 | T |
++---+-+--+---+--+--+---+

best regards
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-23 Thread Dimitri Maziuk

On 2017-09-23 07:04, Dan Langille wrote:


Why? Because nobody wants it enough.


That is fine, as is answering we'll accept the patch. The answer I was 
commenting on is basically why don't you "just" let it stay broken and 
work around the breakage.


Dima

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-23 Thread Gary R. Schmidt

On 23/09/2017 22:04, Dan Langille wrote:

On Sep 22, 2017, at 5:26 PM, Dimitri Maziuk  wrote:

On 2017-09-22 09:47, Heitor Faria wrote:

Hello, John,
"I'm not sure I see the utility of copying and pasting any of the
other formatted numbers here."
I do.  Running calculations within a script, a tally of number of
files, job bytes, averages, etc.
Can't you just workaround using sed (sed 's/,//')?


Why? AFAIK vast majority of humans use nothing or space for thousands separator 
and comma for decimal. Why can't bacula get it right?


Why? Because nobody wants it enough.

I'll fall back to the usual open source stance.  If someone really wanted it, 
it'd already be in the code.

Clearly, nobody wants it enough to do the work (or pay someone else).

If you are playing around with this sort of data you should just pull it 
directly out of the database, formatting and so on can't get in the way 
then.


Cheers,
GaryB-)

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-23 Thread Dan Langille
> On Sep 22, 2017, at 5:26 PM, Dimitri Maziuk  wrote:
> 
> On 2017-09-22 09:47, Heitor Faria wrote:
>> Hello, John,
>>"I'm not sure I see the utility of copying and pasting any of the
>>other formatted numbers here."
>>I do.  Running calculations within a script, a tally of number of
>>files, job bytes, averages, etc.
>> Can't you just workaround using sed (sed 's/,//')?
> 
> Why? AFAIK vast majority of humans use nothing or space for thousands 
> separator and comma for decimal. Why can't bacula get it right?

Why? Because nobody wants it enough.

I'll fall back to the usual open source stance.  If someone really wanted it, 
it'd already be in the code.

Clearly, nobody wants it enough to do the work (or pay someone else).

-- 
Dan Langille - BSDCan / PGCon
d...@langille.org




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-22 Thread Dimitri Maziuk

On 2017-09-22 09:47, Heitor Faria wrote:

Hello, John,

"I'm not sure I see the utility of copying and pasting any of the
other formatted numbers here."

I do.  Running calculations within a script, a tally of number of
files, job bytes, averages, etc.

Can't you just workaround using sed (sed 's/,//')?


Why? AFAIK vast majority of humans use nothing or space for thousands 
separator and comma for decimal. Why can't bacula get it right?


Dima


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-22 Thread Heitor Faria
Hello, John, 

> "I'm not sure I see the utility of copying and pasting any of the other
> formatted numbers here."

> I do. Running calculations within a script, a tally of number of files, job
> bytes, averages, etc.

Can't you just workaround using sed (sed 's/,//')? 

Regards, 

> On Fri, Sep 22, 2017 at 9:56 AM, Phil Stracchino < ph...@caerllewys.net > 
> wrote:

>> On 09/22/17 09:04, Christoph Litauer wrote:
>> > Dear bacula users,

>> > using bacula for many years without problems now. Great software!
>> > One little thing would be nice:
>> > In bconsole, querying e.g. "List alle backups for a client" results in

>> > +-+---++---+-+--+---++
>>> | jobid | client | fileset | level | starttime | jobfiles | jobbytes | 
>>> volumename
>> > | |
>> > +-+---++---+-+--+---++
>>> | 821,494 | printhost | client files-to-backup | F | 2016-11-19 00:10:53 | 
>>> 222,727
>> > | | 5,945,291,349 | LTO6-012 |

>>> As you can see, all numbers are printed using thousands separators. I think 
>>> this
>> > is independent on the current locale (tried with C and en).
>>> These numbers cannot be reused (by copy/paste) within bconsole or some other
>> > scripts without reformatting.
>> > Selecting information using psql seems to ommit those separators.

>> > Would be nice, if bconsole didn't print separators within numbers.

>> ...At least, not within JobIDs. I'm not sure I see the utility of
>> copying and pasting any of the other formatted numbers here.

>> --
>> Phil Stracchino
>> Babylon Communications
>> ph...@caerllewys.net
>> p...@co.ordinate.org
>> Landline: +1.603.293.8485
>> Mobile: +1.603.998.6958

>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users

> --
> ---
> John M. Lockard | U of Michigan - School of Information
> Unix Sys Admin | Suite 205 | 309 Maynard Street
> jlock...@umich.edu | Ann Arbor, MI 48104-2211
> www.umich.edu/~jlockard | 734-615-8776 | 734-763-9677 FAX
> ---
> - The University of Michigan will never ask you for your password -

> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
=== 
Heitor Medrado de Faria | CEO Bacula do Brasil | Visto EB-1 | LPIC-III | EMC 
05-001 | ITIL-F 
• Não seja tarifado pelo tamanho dos seus backups, conheça o Bacula Enterprise: 
http://www.bacula.com.br/enterprise/ 
• Ministro treinamento e implementação in-company do Bacula Community: 
http://www.bacula.com.br/in-company/ 
+55 61 98268-4220 | www.bacula.com.br 
 
Indicamos também as capacitações complementares: 
• Shell básico e Programação em Shell com Julio Neves. 
• Zabbix com Adail Host. 
 
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-22 Thread John Lockard
"I'm not sure I see the utility of copying and pasting any of the other
formatted numbers here."

I do.  Running calculations within a script, a tally of number of files,
job bytes, averages, etc.

On Fri, Sep 22, 2017 at 9:56 AM, Phil Stracchino 
wrote:

> On 09/22/17 09:04, Christoph Litauer wrote:
> > Dear bacula users,
> >
> > using bacula for many years without problems now. Great software!
> > One little thing would be nice:
> > In bconsole, querying e.g. "List alle backups for a client" results in
> >
> > +-+---++---+
> -+--+---++
> > | jobid   | client| fileset| level | starttime
>  | jobfiles | jobbytes  | volumename |
> > +-+---++---+
> -+--+---++
> > | 821,494 | printhost | client files-to-backup | F | 2016-11-19
> 00:10:53 |  222,727 | 5,945,291,349 | LTO6-012   |
> >
> > As you can see, all numbers are printed using thousands separators. I
> think this is independent on the current locale (tried with C and en).
> > These numbers cannot be reused (by copy/paste) within bconsole or some
> other scripts without reformatting.
> > Selecting information using psql seems to ommit those separators.
> >
> > Would be nice, if bconsole didn't print separators within numbers.
>
>
> ...At least, not within JobIDs.  I'm not sure I see the utility of
> copying and pasting any of the other formatted numbers here.
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: +1.603.293.8485
>   Mobile:   +1.603.998.6958
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>



-- 
---
 John M. Lockard |  U of Michigan - School of Information
  Unix Sys Admin |  Suite 205 | 309 Maynard Street
  jlock...@umich.edu |Ann Arbor, MI  48104-2211
 www.umich.edu/~jlockard  |
734-615-8776 | 734-763-9677 FAX
---
- The University of Michigan will never ask you for your password -
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-22 Thread Phil Stracchino
On 09/22/17 10:06, John Lockard wrote:
> "I'm not sure I see the utility of copying and pasting any of the other
> formatted numbers here."
> 
> I do.  Running calculations within a script, a tally of number of files,
> job bytes, averages, etc.


True.  Though if I were doing that, I'd probably wrap bconsole directly
with the script, because that sounds like the kind of thing that if
you're going to do it at all, you should automate it.  And at that point
it's simple to filter out the commas.



-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] print numbers without thousands separators

2017-09-22 Thread Phil Stracchino
On 09/22/17 09:04, Christoph Litauer wrote:
> Dear bacula users,
> 
> using bacula for many years without problems now. Great software!
> One little thing would be nice: 
> In bconsole, querying e.g. "List alle backups for a client" results in
> 
> +-+---++---+-+--+---++
> | jobid   | client| fileset| level | starttime   
> | jobfiles | jobbytes  | volumename |
> +-+---++---+-+--+---++
> | 821,494 | printhost | client files-to-backup | F | 2016-11-19 00:10:53 
> |  222,727 | 5,945,291,349 | LTO6-012   |
> 
> As you can see, all numbers are printed using thousands separators. I think 
> this is independent on the current locale (tried with C and en).
> These numbers cannot be reused (by copy/paste) within bconsole or some other 
> scripts without reformatting.
> Selecting information using psql seems to ommit those separators.
> 
> Would be nice, if bconsole didn't print separators within numbers.


...At least, not within JobIDs.  I'm not sure I see the utility of
copying and pasting any of the other formatted numbers here.


-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] print numbers without thousands separators

2017-09-22 Thread Christoph Litauer
Dear bacula users,

using bacula for many years without problems now. Great software!
One little thing would be nice: 
In bconsole, querying e.g. "List alle backups for a client" results in

+-+---++---+-+--+---++
| jobid   | client| fileset| level | starttime   | 
jobfiles | jobbytes  | volumename |
+-+---++---+-+--+---++
| 821,494 | printhost | client files-to-backup | F | 2016-11-19 00:10:53 |  
222,727 | 5,945,291,349 | LTO6-012   |

As you can see, all numbers are printed using thousands separators. I think 
this is independent on the current locale (tried with C and en).
These numbers cannot be reused (by copy/paste) within bconsole or some other 
scripts without reformatting.
Selecting information using psql seems to ommit those separators.

Would be nice, if bconsole didn't print separators within numbers.

--
Kind regards
Christoph
_
Uni Koblenz, Computing Centre, Office A 022
Postfach 201602, 56016 Koblenz 
Fon: +49 261 287-1311, Fax: -100 1311





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users