본문 바로가기

카테고리 없음

pgadmin backup restore 하는 방법

출처:https://baekh-93.tistory.com/26

 

[PostgreSQL] pgAdmin4을 이용한 DataBase 백업 및 복구하기(DB dump, DB백업,pgAdmin)

PostgreSQL 을 백업하는 방법에는 두가지방법이 있다. 첫번째: pgAdmin을 이용하는 방법 (tool) 두번째: cmd창에서 처리하는 방법 오늘은 먼저 pgAdmin을 이용하는 방법에 대해 다뤄볼 것이다(더 쉬움!, cmd

baekh-93.tistory.com

1.실제 서버 있음

2. local서버 만들기 : postgres계정으로 전환후  user,db,권한설정

3. 실제 서버 데이터 backup & localserver에 restore

4. 만약 데이터베이스 사용안할시 삭제 :

drop 시 에러메시지 발생 (데이터베이스 날릴때)

ERROR:  must be owner of database <yourdatabase>

해결:

참고:https://dba.stackexchange.com/questions/185472/can-not-drop-a-postgresql-database-using-dropdb

dropdb: error: database removal failed: ERROR:  database "database" is being accessed by other users

해결: pgadmin 종료후 dropdb메시지 실행