Scikit Web

pg restore cli with docker 본문

Backend/PostgresSQL

pg restore cli with docker

Keun0 2022. 12. 30. 15:34
728x90
반응형

PostgresSQL 을 도커로 실행하고 있는 상황이라 아래 명령어로 해당 도커의 인스턴스 안으로 접속하여 초기화 한다

sudo docker exec -it 08a814b850ec bash

psql [DB NAME]

truncate table "[TABLE NAME]" restart identity

 

pg restore 기능 중 DB의 특정 테이블을 복구 하는 방법이다

pg_restore --host "localhost" --port "5434" --username "root" --dbname "" --table "" [FILE NAME]
728x90
반응형
Comments