Pulizia PostgreSQL di Puremessage

Export DB, Drop DB, Import DB-

Dall'utente pmx :

set -a
PATH=$PATH:/var/pmx/postgres/bin
PGDATA=/var/pmx/postgres/var/data
PGUSER=pmx
PGDATABASE=pmx_quarantine
pg_ctl stop -mfast
PGPORT=5433
pg_ctl start -o "-p$PGPORT" -l /var/pmx/var/5433.log
time pg_dump -Fc >/var/pmx/var/pmdb.zdump
dropdb $PGDATABASE
createdb $PGDATABASE
time pg_restore /var/pmx/var/pmdb.zdump | psql -qet>/var/pmx/var/load.log
2>&1
time vacuumdb -vz 2>/var/pmx/var/initvac.log
pg_ctl stop
unset PGPORT
pmx-database start

Pulizia PostgreSQL di Puremessage

Leave a Reply

Your email address will not be published.