you shouldn't never edit the script, but if you had check it, you would 
have been able to find out that having db_name in your env variable would 
have done the trick ;-)
we don't want to have an interactive script, that's kill automation :-)

About the documentation you mean that section ? 
https://docs.bareos.org/TasksAndConcepts/CatalogMaintenance.html#remote-postgresql-database

Because it is indicated in the upgrade db as link ....

On Friday, 7 March 2025 at 00:31:11 UTC+1 marcelo.j...@gmail.com wrote:

> Thank you Bruno! You led me in the right direction.
> One thing to notice is that setting the database name with the environment 
> variable PGDATABASE does not work (I suspect this is not the expected 
> behavior). The obvious workaround was to edit the script and hard code the 
> database name.
> It would be great if the script prompted for each of the variables, maybe 
> displaying the defaults with brackets in each prompt, so the user could hit 
> enter to accept the proposed values or type the one it wishes to use.
> If setting environment variables is the recommended way to use the script, 
> maybe the documentation at the Updating Bareos Tutorial 
> <https://docs.bareos.org/IntroductionAndTutorial/UpdatingBareos.html> 
> should reflect that.
> Anyway, thanks again for your help!
> On Thursday, March 6, 2025 at 4:50:25 PM UTC-5 Bruno Friedmann 
> (bruno-at-bareos) wrote:
>
>> You can use the PG env variables to achieve this PGHOST PGPORT PGUSER
>> https://www.postgresql.org/docs/17/libpq-envars.html
>>
>> You're going to have a line similar to ...
>> PGHOST=remotehost /usr/lib/bareos/scripts/update_bareos_tables 
>>
>> On Thursday, 6 March 2025 at 19:52:57 UTC+1 marcelo.j...@gmail.com wrote:
>>
>>> Hi Bareos Community,
>>>
>>> I have the PostgreSQL database on a different machine and I just 
>>> upgraded Bareos to version 24. In past versions I was able to execute the 
>>> script to upgrade the database tables like this:
>>>
>>> ./update_bareos_tables --host=[my database host here] --port=[my 
>>> database port here] --user=[my database user here]
>>>
>>> With version 24, when I execute the script I get the following error:
>>>
>>> Error: db_type --host=[my database host here] is no more supported, only 
>>> postgresql
>>>
>>> How do I solve this? 
>>>
>>> Thank you!
>>>
>>>

-- 
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 visit 
https://groups.google.com/d/msgid/bareos-users/f243548c-cb66-43a4-9aaa-af214007ff66n%40googlegroups.com.

Reply via email to