Postgres and Alfresco

Tags:

`

$ ps -ax ... 23481 ? Ss 1:15 /opt/alfresco-4.0.d/postgresql/bin/postgres -D * /opt/alfresco-4.0.d/alf_data/postgresql * -p 5432 ... ` $ psql -h

**

/opt/alfresco-4.0.d/postgresql/ * -U postgres *

**

or:

`

$ psql - * h localhost -U postgres *

**`

otherwise you will receive:

`

$ psql psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? `

Upon successfully executing psql above, you should see:``

Password for user postgres: List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges ---------+----------+----------+-------------+-------------+----------------------- alfresco | alfresco | UTF8 | en_US.UTF-8 | en_US.UTF-8 | ...

The version of Postgres used by Alfresco may differ from your system's standard one. To get a database backup, you may have to specify the version of pg_dump to use:

`

$ /opt/alfresco-4.0.d/postgresql/bin/pg_dump -h localhost -U postgres alfresco > /tmp/x `

Don't forget to also backup your Alfresco data directory -- on my default install, this was /opt/alfresco-4.0.d/alf_data ... check your /classes/alfresco/repository.properties file and look under the dir.root entry to be sure. Further details on the Alfresco site.