Hello Bill,
The simplest way would be to use an Excel plugin (don't know if version
you're using has it by default) to connect directly to your catalog.
Then simply import the Media table into Excel.
So no needs to perform a SQL query
Hope it'd helpful
Regards
Davide
On Jan 9, 2014 11:35 PM, "Bill Arlofski" <waa-bac...@revpol.com> wrote:
> On 01/09/14 15:45, Shadow187 wrote:
>
> You can used a (simple) one-liner like this:
>
>
> echo "SELECT * FROM Media;" \
> | mysql -u bacula bacula \
> | sed -e 's/\(^.\)/"\1/' \
> -e 's/\t/","/g' \
> -e 's/\(.$\)/\1"/' > /tmp/media.csv
>
> That will output all of your media (all columns of the Media table) into a
> file '/tmp/media.csv' as a double-quoted, comma-delimited list that should
> be
> readily imported into Excel.
>
> Also, you may not care about several of the columns returned (e.g.:
> ScratchPoolId, InChanger, DeviceId etc) so you can choose/limit the columns
> you want by changing the * in the SELECT statement to a comma separated
> list
> of the columns you do want like so:
>
> SELECT MediaId, VolumeName, VolStatus, VolErrors FROM Media....
>
> Hope this helps.
>
> --
> Bill Arlofski
> Reverse Polarity, LLC
> http://www.revpol.com/
> -- Not responsible for anything below this line --
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users