Re: [Bacula-users] read tape label from bash

2018-08-09 Thread Bill Arlofski
On 08/09/2018 04:13 AM, Adam Weremczuk wrote: > Hi all, > > What's the best way to read Bacula label of a currently mounted tape directly > from bash? > > In our environment I can fairly reliably determine it with: > > tail -1 /var/lib/bacula/log > 08-Aug 14:19 bacula_dir JobId 0: Recycled volum

Re: [Bacula-users] read tape label from bash

2018-08-09 Thread Heiko Schellhorn
Hi I'm aware of bconsole, btape etc. but they are all interactive consoles. You could use that: bconsole < <(echo "status storage") Or if you want something more specific, you could use the expect command. Perhaps the data pieces you want can be retrieved through sg_utils, but I don't know h

Re: [Bacula-users] read tape label from bash

2018-08-09 Thread Pedro Oliveira
Please have a look on https://www.bacula.org/5.1.x-manuals/de/utility/utility/Volume_Utility_Tools.html 2018-08-09 11:26 GMT+01:00 Jérôme Blion : > > I'm aware of bconsole, btape etc. but they are all interactive consoles. >> > > You could use that: bconsole < <(echo "status storage") > Or if yo

Re: [Bacula-users] read tape label from bash

2018-08-09 Thread Jérôme Blion
I'm aware of bconsole, btape etc. but they are all interactive consoles. You could use that: bconsole < <(echo "status storage") Or if you want something more specific, you could use the expect command. Perhaps the data pieces you want can be retrieved through sg_utils, but I don't know how

[Bacula-users] read tape label from bash

2018-08-09 Thread Adam Weremczuk
Hi all, What's the best way to read Bacula label of a currently mounted tape directly from bash? In our environment I can fairly reliably determine it with: tail -1 /var/lib/bacula/log 08-Aug 14:19 bacula_dir JobId 0: Recycled volume "LTO-W20110914A" but ideally I would prefer Bacula to repo