PostrgeSQL

Создание БД

Настраиваем доступ пользователю postgresql
$ echo "ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres';" |sudo -u postgres psql
$ echo "CREATE DATABASE fias WITH OWNER postgres;" |sudo -u postgres psql
$ pg_dump -U postgres -d fias > fias.sql
$ pg_dump -U postgres -d fias | gzip > fias.gz
$ pg_dumpall > outfile.sql
$ pg_dump --host 127.0.0.1 --port 5432 --username "postgres" --no-password  --format plain --no-owner --no-privileges --no-tablespaces --verbose --no-unlogged-table-data --file "/dump3" "test"
$ sudo -u postgres pg_dump -U postgres -d fias -n public > /tmp/fias.sql
$ sudo -u postgres pg_dump -U postgres -d fias -n public --schema-only
# psql park < ./park.sql
# psql -h localhost -f dump2 -U postgres test2
# psql –h localhost –p 5432 --dbname=park --username=mirocow < park2.20151018_142522/park2.sql
# gunzip < ./fias.gz | psql -U postgres -h localhost fias

Компаненты / Настройка