This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

postgresql: rebuild data directory

bom bom
Added by over 2 years ago  »  Votes: 1/1

Keywords: postgresql, psql, initdb

Rebuild data directory of postgresql server on Debian Lenny

1 $ export D_PGDATA="/mnt/var/lib/postgresql/8.4/main/" 
2 $ mkdir -pv $D_PGDATA && chmod 700 $D_PGDATA
3 $ chown postgres:postgres -Rfv $D_PGDATA
4 $ sudo -u postgres /usr/lib/postgresql/8.4/bin/initdb $D_PGDATA
5 $ cd $D_PGDATA
6 $ ln -s /etc/ssl/private/ssl-cert-snakeoil.key server.key
7 $ ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem   server.crt

Comments