There's no point in creating those pools in the first place. Just define
a single pool in the config files and the daemon will create only this
defined pool.
If there's no Scratch pool defined, it will not be created.
https://docs.bareos.org/Configuration/Director.html#pool-resource
https://docs.bareos.org/Configuration/Director.html#scratch-pool
Notice the "if it exists" in description of Scratch Pool
Long story short then - don't create pools so you don't have to delete
them. Just set up a server with a defined pool(s) and you should be ok.
BTW, consider using some automation solution (for example - ansible) for
installing a server from scratch instead of own script.
On 16.06.2020 12:00, DUCARROZ Birgit wrote:
Hi Spadajspadaj,
First of all, thank you for your response.
I created a script which completely installs my server. The script is
meant to ease an eventual next installation on a new server
(migration) and at the same point it is meant to be my documentation.
The script installs a bareos server which will serve as archiving
server on single tapes.
Since I will and would not need incremental nor differential nor
scratch pools (I will only archive data using full-backup), I would
like to delete these pools using this initial installation script.
See also my post and answer from Philipp Storz:
https://groups.google.com/forum/#!searchin/bareos-users/Birgit$20Ducarroz%7Csort:date/bareos-users/g53BNdTat2s/YhlHeARHAgAJ
It would have been a nice feature to automate the deletion of these
pools directly at the installation.
So I wonder how I can manage this in my script.
Kind regards,
Birgit
On 15/06/20 21:32, Spadajspadaj wrote:
Hi Birgit.
To be honest, I fail to see what would be the point of deleting a
pool from a script. If you need to delete a pool, you do it once,
interactively and everything's good.
Of course you can do a delete pool from bconsole but if you don't
delete it from the configuration it'll get recreated as soon as you
reload the configuration or restart the director. And ID of the pool
will change. (even if you're able to delete a pool having media
assigned to it, which I'm not sure you can do, those media would not
get re-associated to a new pool named the same as the old one).
But the bottom line is - why would you even want to do such a thing.
Especially considering that if you want to be able to batch-delete
pools you'd have to have a way to batch-create pools as well
(otherwise what would you be deleting?).
Can you please elaborate a bit more what you're trying to achieve?
On 14.06.2020 22:35, 'DUCARROZ Birgit' via bareos-users wrote:
Hi all,
How can I autodelete a pool (i.ex in a script)?
echo delete pool=Scratch yes | bconsole
--> does unfortunately not work
I can rm /etc/bareos/bareos-dir.d/pool/Scratch.conf, but doing so
will keep listing the pool in my storages list (see print-screen).
Thank you for any help.
Kind regards,
Birgit
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/bareos-users/f2753ceb-31b1-26a4-86ac-551e1d779fb0%40gmail.com.