반응형
2018/03/02
-
postgreSQL 데이터 디렉토리 변경프로그래밍/DB 2018. 3. 2. 16:15
Ubuntu 에서 postgreSQL 데이터 디렉토리 변경하기 서버 OS : Ubuntu postgreSQL : 9.6.6 1. 현재 데이터 디렉토리 위치 확인 # psql -U postgres -d dbname -WPassword for user postgres:psql (9.6.6)Type "help" for help. dbname# show data_directory; data_directory--------------------------- /var/lib/postgresql/9.6/main(1 row) 2. 기존 데이터 디렉토리를 새로운 디렉토리로 변경하거나 복사하기 #cp -rf /var/lib/postgresql/9.6/main /home/newdirectory/ 3. postgresql 설..