[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] RaQ4 - cobalt-psql Database setup & Interaction with system ?



|
|Here to my Question. Can I reset the postgres-Database by using (b.e. the
|/etc/cobalt/postgres.db file as reference). Or is there any document that
|explains the Interaction between the Database, the eb Interface and the
|related Authentication scheme ?
|

Before resetting the database you can check a few places and make sure the
setup is sane.  First, look in the postgresql "host access control file" 
located at /var/lib/pgsql/data/pg_hba.conf.  At a minimum it should contain
an uncommented line that says "local cobalt crypt".  This allows local
programs to connect to the postgresql backend via a unix local domain socket
in /tmp/.s.PGSQL.5432, the next step is to make sure this file exists and
is owned by the "postgres" user.

If the above checks don't turn up anything unusual, then try resetting the
database.  On a RaQ4 this is fairly simple:  (this will NOT work on a RaQ3)

stop the running postgresql daemon:
	/etc/rc.d/init.d/postgresql stop

move the existing data directory out of the way:
	mv /var/lib/pgsql/data /var/lib/pgsql/data.save

restart the postgresql daemon:
	/etc/rc.d/init.d/postgresql start

You should see some output indicating that the database system is being
initialized, etc..  Once this completes, hopefully without any errors,
it will automatically add the necessary cobalt database and tables from
the /etc/cobalt/postgres.db file.  The next step is to reconstruct the
tables from your system configuration by running:
	/usr/local/sbin/meta-verify -f

Which should also display some encouraging output about repairing invalid
virtual sites and users, and hopefully marking each one "saved".  That
should be all you need to do, but you can test to see if swatch is happier
by running:
	/usr/local/sbin/swatch -d

and looking for any warnings or errors.  It will attempt to connect to
the database first thing and will not continue if it does not succeed.
If all is well with swatch and the Admin GUI then go ahead and delete the
saved data directory in /var/lib/pgsql.

good luck,
-duncan