I restore postgres data_dir from backup(backuppc). When I start postgres, I get the following error:

* Starting PostgreSQL 8.4 database server
* Error: could not exec /usr/lib/postgresql/8.4/bin/pg_ctl /usr/lib/postgresql/8.4/bin/pg_ctl start -D /var/lib/postgresql/8.4/main/ -l /var/log/postgresql/postgresql-8.4-main.log -s -o -c config_file="/etc/postgresql/8.4/main/postgresql.conf"
link|improve this question

what error, when run /usr/lib/postgresql/8.4/bin/pg_ctl /usr/lib/postgresql/8.4/bin/pg_ctl start -D /var/lib/postgresql/8.4/main/ -l /var/log/postgresql/postgresql-8.4-main.log -s -o -c config_file="/etc/postgresql/8.4/main/postgresql.conf" – ooshro Feb 24 '11 at 9:23
feedback

1 Answer

up vote 1 down vote accepted

Try change data directory owner to postgres:

chown -R postgres:postgres /var/lib/postgresql/8.4/main/
link|improve this answer
I extract to another directory. Thanks! – bindbn Feb 24 '11 at 9:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.