Swapping database servers

This procedure is rarely used, but is documented nonetheless.

A database server change is usually accomplished by moving the IP address from one server to another, not by adjusting the clients. The production database server is usually at 127.1.54.32.

When changing from one database server to another, there are a few configuration files to update:

Ingress host

These files are in /usr/local/etc/freshports:

  • config.pm$FreshPorts::Config::host : should contain the IP address of the PostgreSQL database server.
  • config.shHOST : The IP address of the PostgreSQL server.
  • ~freshports/.pgpass – Usually does not require updating as it contains a wildcard for the hostname.

This needs to be restarted:

svc -t /var/service/freshports

Website host

These files are in /usr/local/etc/freshports:

  • config.shHOST : The IP address of the PostgreSQL server.
  • database.php – The pg_connect call contains a host=IP.ADD.RE.SS clause.
  • forums.php – Contains a $PHORUM[‘DatabaseServer’] entry.
  • fp-listen.ini – Contains a HOST declaration.

These files are in /usr/local/etc/freshsource:

  • database.php – The pg_connect call contains a host=IP.ADD.RE.SS clause.
  • forums.php – Contains a $PHORUM[‘DatabaseServer’] entry.
  • fp-listen.ini – Contains a HOST declaration.

This needs to be restarted:

svc -t /var/service/fp-listen
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top