Community mailing list archives

Re: postgres credentials(forbackups)? installed with bitnami-odoo installer

- 02/04/2015 06:33:29
Hello Anders,

your approach would work with a default postgresql installation in most 

However Odoo installed with bitnami-odoo installer will not let you 
access postgresql with psql, without a password (your script would fail 
for two reasons: one, the path to psql is not in PATH on Odoo setup made 
with bitnami-odoo installer; second, psql command would fail on 
authentication, because the password is not specified).

Is it really that anyone who made bitnami-odoo installer did not 
document, or perhaps even did not put a bit of thinking into the 
installer? And the only way to get superuser db connection is "hacking" 
the config, adding a second user, making changes back?

Tomasz Chmielewski

On 2015-02-04 18:58, Anders Wallenquist wrote:
> This is how we usually take backup:
> /etc/cron.daily/db_backup:
> #!/bin/bash
> for DB in `su postgres -c "psql -At -c "select datname from
> pg_database
> where datistemplate = false and 'postgres' datname;" postgres"`
> do
>  echo $DB
>  su postgres -c "pg_dump -Fp $DB " | gzip >
> /var/backups/"$DB".sql.gz
> done
> The backup-script are run as root and we access the database using su
> postgres
> Regards
> Anders Wallenquist
> Den 2015-02-03 17:33, Tomasz Chmielewski skrev:
>> I've installed Odoo from
>> I'd like to backup my Odoo postgres database.
>> Unfortunately, I see it's set to use a password, and I'm not able to
>> find in documentation what password was it set to (or where to find
> it
>> out):
>> root@odoo01:~# su - postgres
>> No directory, logging in with HOME=/
>> $ /opt/odoo-8.0-5/postgresql/bin/psql
>> Password:
>> psql.bin: fe_sendauth: no password supplied
>> What is the password for "postgres" database user (or any other
> admin
>> user, or where to find that info) with Odoo installed with
>> --
>> Tomasz Chmielewski