PostgreSql
델리마운트 위키
목차 |
이전 문서
설치
우분투에 설치
명령어
$ sudo apt-get install postgresql
사용자 추가
서비스용 사용자 추가
- sudo su - postgres
- createuser -S -d -R -l -i -P -E new_user_name
참고 : createuser
Database 추가
- sudo su - postgres
- createdb -O owner_name new_database_name
참고 : createdb
Database 삭제
- sudo su - postgres
- dropdb database_name
백업/복원
- postgresql Documentation Manuals PostgreSQL 8.3 Backup and Restore
- Howto Backup PostgreSQL Databases Server With pg_dump command
로그 관리
pg_ctl start | rotatelogs /path_to_log_directory/log_file_name
86400 [ex. 86400 = 60(s) * 60(m) * 24(h) (as time) ]
- Log File Maintenance : PostgreSql official site documents
