SUNScholar/Disaster Recovery/Preparation

From Libopedia
Jump to navigation Jump to search
Back to Disaster Recovery - System Monitor Client
Back to Disaster Recovery - Local Backup Script

PostgreSQL Database Credentials

Create a credentials file for the postgres or dspace user. See:

Open a terminal on the server and type the following:

To become the postgres user.

su - postgres

To create the credential file type.

 nano ~/.pgpass

Copy and paste the following into the file:


This file should contain lines of the following format: hostname:port:database:username:password

To lock down file permissions type.

chmod 0600 ~/.pgpass

To test type.


You should be automatically connected to the database now.

To quit the database type.