본문 바로가기
Programming/Database

[PostgreSQL] file not found 오류 해결하기

by eungbbang 2021. 6. 29.
반응형

📌문제점

 

DB에서 Restore를 시도하자 아래와 같은 에러가 발생하며 더이상 진행되지 않았다. 당연하겠지만 OK를 눌러도 아무 반응이 없음.

무슨 일인가 싶어 PostgreSQL파일에 들어가봤더니 pdAdmin4 파일까지는 있지만 runtime 파일이 없었다.

설치가 잘못되었나 싶어 전부 지우고 새로 설치해봐도 똑같은 상황이 발생했고, Backup같은 기능도 실행파일만 다르고 동일한 오류가 발생했다.

 

error:

'C:\Program Files\PostgreSQL\13\pgAdmin 4\runtime\pg_restore.exe' file not found.

Please correct the Binary Path in the Preferences dialog

 

결론부터 말하자면 pg_restore.exe  파일이 pdAdmin4\runtime이 아닌 다른 곳에 설치되어 있기 때문에 발생한 에러였다. 따라서 실행파일을 찾은 뒤 옮겨주기만 하는 간단한 문제다.

 

 


 

📌해결방법

 

1. PostgreSQL 파일에서 pg_restore 검색

       pg_restore.exe 파일은 C:\Program Files\PostgreSQL\13\bin 안에 저장되어 있는 것을 확인 할 수 있다.

 

 

2. pdAdmin 4 안에 runtime 폴더 생성

      일반 폴더 생성하듯이 새로 만들기 > 폴더 > runtime으로 이름 변경하여 생성하면 된다.

 

 

3. 위에서 pg_restore.exe 파일이 위치한 곳의 모든 파일을 복사한 다음 새로 생성한 runtime 폴더 안에 붙여넣기 한다.

        이때 관리자 권한이 필요하다는 메시지가 뜨는데 모든 항목에 같은 작업 실행을 체크하고 계속을 누른다.

 

 

4. 다시 restore을 시도해보면 정상적으로 실행되는 것을 확인 할 수 있다. 

 

 


 

아래는 참고한 사이트

https://dba.stackexchange.com/questions/291534/cannot-do-a-restore-using-pgadmin4-after-a-new-install-of-postgresql-pg-restor#

 

Cannot do a restore using PgAdmin4 after a new install of PostgreSQL - pg_restore.exe file not found

I am new to PostgreSQL. I installed the software. Almost everything works. Then I tried to follow a tutorial for dvdrental. All instructions for using from command line worked. Then there is instru...

dba.stackexchange.com

 

반응형

댓글