기본적으로,
[root@localhost]# su - postgres
로 접속 후 입력을 진행해 주세요
1. 백업
- pg_dump dbname > 폴더/백업name
1-1. 백업 경로 지정 안했을시 (아래 경로로 들어가면 파일있음)
- cd /var/lib/pgsql/
2. db 삭제 및 생성
- dropdb -U postgres dbname (db 드랍)
- createdb -U postgres -E 인코딩 dbname (db 생성)
- psql -U postgres db이름 (생성된 db 접속)
3. backup 복구
- \i 백업파일name