Gigabyte MX31-BS0 Manual - Page 14

Restore dbRMCv0XX.backup

Page 14 highlights

6. Install PostgreSQL yum install postgresql93-server 7. Initialize service postgresql-9.3 initdb 8. Startup chkconfig postgresql-9.3 on 1-5-3 Restore dbRMCv0XX.backup 1. Modify pg_hba.conf file vi /var/lib/pgsql/9.3/data/pg_hba.conf 2. Edit TYPE DATABASE Local all host all host all :wq to save edited file. USER all→postgres all→postgres all→postgres ADDRESS 127.0.0.1/32 ::1/128 METHOD peer→trust indent→trust indent→trust 3. Start service service postgresql-9.3 start 4. Create database createdb -U postgres dbRMC 5. Restore dbRMCv0XX.backup to database pg_restore -h 127.0.0.1 -p 5432 -U postgres -d dbRMC -v "dbRMCv0XX.backup" Gigabyte Server Management Console - 14 -

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

Gigabyte Server Management Console
- 14 -
6.
Install PostgreSQL
yum install postgresql93-server
7.
Initialize
service postgresql-9.3 initdb
8.
Startup
chkconfig postgresql-9.3 on
1-5-3
Restore dbRMCv0XX.backup
1.
Modify pg_hba.conf file
vi /var/lib/pgsql/9.3/data/pg_hba.conf
2.
Edit
TYPE
DATABASE
USER
ADDRESS
METHOD
Local
all
all→postgres
peer→trust
host
all
all→postgres
127.0.0.1/32
indent→trust
host
all
all→postgres
::1/128
indent→trust
:wq to save edited file.
3.
Start service
service postgresql-9.3 start
4.
Create database
createdb -U postgres dbRMC
5.
Restore dbRMCv0XX.backup to database
pg_restore -h 127.0.0.1 -p 5432 -U postgres -d dbRMC -v "dbRMCv0XX.backup"