This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.
Connect to Database
Option a) via tco
Connect to DB of installation:
tco db ${INSTALLATION}
Connect to history DB of installation:
tco db -t history ${INSTALLATION}
Connect to alternative DB on server:
tco db -t history ${INSTALLATION}/${DB_NAME}
See tco db --help for more details.
Option b) via ssh
Identify DB server:
Look for db_server in config.yml. This is the DB server used by an installation.
ssh into machine:
$ tco db-ssh ${INSTALLATION}or:
$ ssh ${DB_SERVER}Then connect to Postgres:
$ psql ${db_name}Alternatively, if you don’t know the DB name, connect to DB postgres:
$ psql postgres
Then connect to the right DB like this:
$ \c ${DB_NAME}Use TAB for autocompletion.