Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
8 Odpowiedzi
64772 Widoki

Hello,

I m trying to make backup. i have master password and i double confirm master password from its main configuration file at /etc/openerp-server.conf . Its centos 6.5 final.

When i Try to make backup from its Backup function in "Manage Databases". it shows popup message "Access Denied".

I also try to make backup via command line. here is the output result i got.

 

bash-4.1$  pg_dump -f database1.tar -F tar -O database1
could not change directory to "/root"
pg_dump: [tar archiver] could not open TOC file "database1.tar" for output: Permission denied

OPenerp verision: openerp-7.0-latest

 

EDIT: 4 - SEP - 2014, After helping suggestion i got actual error.

 

pg_dump: server version: 9.2.9; pg_dump version: 8.4.20
pg_dump: aborting because of server version mismatch

How can i fix this issue ?

 

ANy help appreciated.

Awatar
Odrzuć
Najlepsza odpowiedź

It looks like your current directory is /root which can't be written by user postgres. Try to execute the same command with the same user in /tmp.

Awatar
Odrzuć

Sharp sight! Alternatively you can make the dump in postgres' home directory (cd ~) when logged in as Postgres user. This directory should always be writeable by user postgres.

Autor

@Ben Bernard, You was right. changed directory shows the exact error. pg_dump: server version: 9.2.9; pg_dump version: 8.4.20 pg_dump: aborting because of server version mismatch How can i fix this issue ?

Autor

OK, i generate the backup via this command. bash-4.1$ /usr/pgsql-9.2/bin/pg_dump -f database1.tar -F tar -O database1

Najlepsza odpowiedź

Just ran into this same issue.  For me, the answer was to chown the owner of the backup destination directory to the PostgreSQL user and group, in my case 'postgres:postgres'.

$> sudo chown -R postgres:postgres /Postres/Odoo/Backups/Directory/

Once that was in place, backups completed successfully.

Awatar
Odrzuć
Najlepsza odpowiedź

The system user that you run the comman with, is it in Postgres? Also, does the database you try to dump belong to that user?

Awatar
Odrzuć
Autor

Yes, i switched user from root to postgres, i also double checked the owner of the db is postgres. but still can't able to make backup.

login as postgres user and type below command for backup: pg_dump --cluster 9.1/main --format=c database_name > desired_db_name.dump