Am 20.03.25 um 15:59 schrieb Rob Gerber:
Stefan,
Here is some information to assist with crafting postgres sql queries.
The postgres psql shell provides tools to look up tables and their
columns so you know what keywords to specify in your queries. You can
also easily test queries and get fee
I haven't seen it explicitly explained in this thread, so here is some
information about the bconsole query command.
Throughout this email, I will assume you installed bacula using the bacula
community repositories, which installs bacula in the /opt/bacula/ folder by
default. If your bacula files
Stefan,
Here is some information to assist with crafting postgres sql queries. The
postgres psql shell provides tools to look up tables and their columns so
you know what keywords to specify in your queries. You can also easily test
queries and get feedback. psql will tell you when you've made a s
Am 19.03.25 um 11:52 schrieb Gary R. Schmidt:
Look up what the PoolId for "Daily" is from Pool and use Media.PoolId =
Whatever_That_Is rather than the non-existent (in my version of bacula)
Media.Pool.
I had tried that, but with errors. Retried, rm-ed the JOIN and Pool.Name
from the SELECT,
On 19/3/25 21:36, Stefan G. Weichinger via Bacula-users wrote:
ok, I now have:
# cat bacula_tapes.sh
#!/bin/bash
echo -e "sql\nSELECT Media.MediaId, Media.VolumeName, Media.PoolId,
Pool.Name AS Pool, Media.Slot,\
Media.Slot <> 0 AS InChanger, Media.FirstWritten,
Media.LastWritten, Me
ok, I now have:
# cat bacula_tapes.sh
#!/bin/bash
echo -e "sql\nSELECT Media.MediaId, Media.VolumeName, Media.PoolId,
Pool.Name AS Pool, Media.Slot,\
Media.Slot <> 0 AS InChanger, Media.FirstWritten,
Media.LastWritten, Media.VolStatus, \
GREATEST(0, (extract('epoch' from LastWr
> On Fri, 14 Mar 2025 14:21:15 +, Bill Arlofski via Bacula-users said:
>
> In a script, you can do:
>
>
> echo -e "sql\nSELECT..ORDER BY volumename INC;\n\nquit\n" | bconsole
>
>
> The echo -e: enable interpretation of backslash escapes
>
> The `\n` in the script are line feeds.
Am 14.03.25 um 15:21 schrieb Bill Arlofski via Bacula-users:
On 3/14/25 4:03 AM, Stefan G. Weichinger via Bacula-users wrote:
Am 14.03.25 um 07:48 schrieb Stefan G. Weichinger via Bacula-users:
I use an 8-slot autoloader, I added a little bit of SQL to the query
file and just run that, it list
On 16/3/25 08:48, Bill Arlofski wrote:
On Friday, March 14th, 2025 at 21:27, Gary R. Schmidt
wrote:
On 15/3/25 01:24, Bill Arlofski via Bacula-users wrote:
On 3/14/25 5:22 AM, Gary R. Schmidt wrote:
As a cronjob I'd put "echo query 22 | bconsole" in a file and execute
that.
Cheers
On Friday, March 14th, 2025 at 21:27, Gary R. Schmidt
wrote:
> On 15/3/25 01:24, Bill Arlofski via Bacula-users wrote:
>
> > On 3/14/25 5:22 AM, Gary R. Schmidt wrote:
> >
> > > As a cronjob I'd put "echo query 22 | bconsole" in a file and execute
> > > that.
> > >
> > > Cheers,
> > > Gary
On 13/3/25 18:14, Stefan G. Weichinger via Bacula-users wrote:
thanks all for your replies and explanations.
It wasn't my intention to let somebody else do my work, no :-)
I see the complexity somehow, and wonder if I can at least come up with
something that *helps* choosing the next 8 tapes
On 15/3/25 01:24, Bill Arlofski via Bacula-users wrote:
On 3/14/25 5:22 AM, Gary R. Schmidt wrote:
As a cronjob I'd put "echo query 22 | bconsole" in a file and execute
that.
Cheers,
Gary B-)
This will not work. :)
Works perfectly for me:
$ echo "echo query 22 | bconsole"
On 3/14/25 5:22 AM, Gary R. Schmidt wrote:
As a cronjob I'd put "echo query 22 | bconsole" in a file and execute that.
Cheers,
GaryB-)
This will not work. :)
But, you *could* do:
8<
echo -e "query\n22\nquit\n" | bconsole
8<
Best regards,
Bill
On 3/14/25 4:03 AM, Stefan G. Weichinger via Bacula-users wrote:
Am 14.03.25 um 07:48 schrieb Stefan G. Weichinger via Bacula-users:
I use an 8-slot autoloader, I added a little bit of SQL to the query
file and just run that, it lists my tapes from last-used to most recent.
I grab the three old
On 14/3/25 21:03, Stefan G. Weichinger via Bacula-users wrote:
Am 14.03.25 um 07:48 schrieb Stefan G. Weichinger via Bacula-users:
I use an 8-slot autoloader, I added a little bit of SQL to the query
file and just run that, it lists my tapes from last-used to most recent.
I grab the three oldes
Am 14.03.25 um 07:48 schrieb Stefan G. Weichinger via Bacula-users:
I use an 8-slot autoloader, I added a little bit of SQL to the query
file and just run that, it lists my tapes from last-used to most recent.
I grab the three oldest, move them to the Scratch pool, purge them,
and replace the t
Am 13.03.25 um 13:09 schrieb Gary R. Schmidt:
On 13/3/25 18:14, Stefan G. Weichinger via Bacula-users wrote:
thanks all for your replies and explanations.
It wasn't my intention to let somebody else do my work, no :-)
I see the complexity somehow, and wonder if I can at least come up
with so
thanks all for your replies and explanations.
It wasn't my intention to let somebody else do my work, no :-)
I see the complexity somehow, and wonder if I can at least come up with
something that *helps* choosing the next 8 tapes each week.
Currently mostly I select the tapes, I am the exte
Hi,
wt., 11 mar 2025 o 21:12 Bill Arlofski via Bacula-users <
bacula-users@lists.sourceforge.net> napisał(a):
>
> Here's why I say "guessed":
>
>
I have a story - I had multiple jobs one day and the Director "guessed" all
can come to the single tape, because this was available, but not all fit in
On 3/12/25 5:09 AM, Radosław Korzeniewski wrote:
Hi,
wt., 11 mar 2025 o 21:12 Bill Arlofski via Bacula-users mailto:bacula-
us...@lists.sourceforge.net>> napisał(a):
Here's why I say "guessed":
I have a story - I had multiple jobs one day and the Director "guessed" all can come to the
On 3/11/25 1:29 PM, Dragan Milivojević wrote:
You are basically asking if someone can transfer your thought process and
reasoning into a custom script. Unless there are mind readers here ;) that is
not
going to happen. Describe your selection process in an algorithmic way and
transfer
that into
You are basically asking if someone can transfer your thought process and
reasoning into a custom script. Unless there are mind readers here ;) that
is not
going to happen. Describe your selection process in an algorithmic way and
transfer
that into a bash shell. If you are adventurous try ChatGPT,
Am 04.03.25 um 08:17 schrieb Stefan G. Weichinger via Bacula-users:
So basically I look into the "Volumes" part of Bacularis, look for
status "Append" or "Used", and take the tapes that are already
overwritable again.
And I look at the tapes in the loader which are full -> take them out
and
Am 03.03.25 um 17:37 schrieb Rob Gerber:
Stefan,
Can you share some details about your current process to predict what
media will be needed, including information about your pools and volumes
inside them?
Sure.
At first: thanks for offering your help!
-
Basically we run one schedule with
In this email I will give some examples on how to send a command to
bconsole from within a shell script. I will attach one of my shell scripts
that *DOES NOT do what you need.* It is provided only as an example of how
a shell script could be made to interact with bacula. There is some error
checkin
Stefan,
Can you share some details about your current process to predict what media
will be needed, including information about your pools and volumes inside
them?
I am not aware of a tool that forecasts what media will be needed by jobs
scheduled in the future, but that doesn't mean that such a
26 matches
Mail list logo