Hi Spadajspadaj,

Thank you for this. I'll have a look how to do is the best way for me.

Regards,
Birgit

On 17/06/20 09:16, Spadajspadaj wrote:
Depends on what you mean by "standard installation" :-)

Anyway, I believe the installer itself installs only empty database and the appropriate entries are getting created (if they are not already there) with a director reading the configuration on startup (or reload).

So if you install the software, _don't_ start the director, prepare config files and then start the director daemon you should be on the safe side.

On 16.06.2020 21:08, DUCARROZ Birgit wrote:
Thank you for your hints.

So but if I understand right, the standard installation creates these pools by default, and if I would not create them at the beginning, my script has first to change the default config.

In any way I have to adapt my script.

Regards,
Birgit

On 16/06/20 13:32, Spadajspadaj wrote:
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/0a9d0e37-3963-2351-46a3-91958cc276c3%40unifr.ch.

Reply via email to