Escolar Documentos
Profissional Documentos
Cultura Documentos
3. 4. 5.
6.
pb_hba.conf
PostgreSQL? uses the /var/lib/pgsql/data/pb_hba.conf le to nd out how users should authenticate in order to access databases.
Restore
Restore the databases as user postgres. First move the archive into /var/lib/pgsql and change its owner/group to user postgres, then create the database via cPanel along with users and user assignment. # su -l postgres # cd /var/lib/pgsql # pg_restore -v -C -O -d databasename -v databasename.tar </pre>
psql -U postgres template1 -f - << EOT REVOKE ALL ON DATABASE template1 FROM public; REVOKE ALL ON SCHEMA public FROM public; GRANT ALL ON SCHEMA public TO postgres; EOT
A couple of notes:
For testing purposes, log into cPanel directly instead of using the root override. phpPgAdmin does not work reliably using the root override. Clear your browser cache after editing pb_hba.conf and restarting PostgreSQL?. Many times I have xed the problem without realizing it because my browser had cached a phpPgAdmin page. For some reason this application seems to be heavily cached most of the time. Do not use trust as an authentication method, contrary to what several misguided posters have mentioned in our forums. trust equates to "Do you trust me?" If your answer is "Should I?", "In what context?" or any form of "No", then you probably shouldn't. md5 should be used instead of trust.