Skip to Content
PostgreSQL: 시작부터 실행까지, 3판
book

PostgreSQL: 시작부터 실행까지, 3판

by Regina O. Obe, Leo S. Hsu
May 2025
Beginner to intermediate
314 pages
5h 4m
Korean
O'Reilly Media, Inc.
Book available
Content preview from PostgreSQL: 시작부터 실행까지, 3판

부록 B. PostgreSQL 패키지 명령줄 도구

이 부록에는 PostgreSQL 서버와 함께 패키지로 제공되는 필수 명령줄 도구가 요약되어 있습니다. 이에 대해서는 책에서 자세히 설명했습니다. 여기에서는 해당 도움말 메시지를 나열합니다. 이러한 도구를 포함함으로써 시간을 조금이라도 절약하고 이 책이 낯설지 않은 동반자가 될 수 있기를 바랍니다.

pg_dump를 사용한 데이터베이스 백업

사용 pg_dump 을 사용하여 데이터베이스의 전체 또는 일부를 백업합니다. 사용 가능한 백업 파일 형식은 TAR, 압축(PostgreSQL 사용자 지정 형식), 일반 텍스트 및 일반 텍스트 SQL입니다. 일반 텍스트 백업은 psql 관련 명령을 복사할 수 있으므로 psql 내에서 파일을 실행하여 복원할 수 있습니다. 일반 텍스트 SQL 백업은 표준 SQL CREATEINSERT 명령이 포함된 파일일 뿐입니다. 복원하려면 psql 또는 pgAdmin을 사용하여 파일을 실행하면 됩니다. 예제 B-1은 pg_dump 도움말 출력을 보여줍니다. pg_dump 사용법에 대한 자세한 내용은 "pg_dump를 사용한 선택적 백업"을 참조하세요 .

예제 B-1. pg_dump 도움말
pg_dump --help
pg_dump dumps a database as a text file or to other formats.
Usage:
pg_dump [OPTION]... [DBNAME]

General options:
-f, --file=FILENAME         output file or directory name
-F, --format=c|d|t|p        output file format (custom, directory, tar, plain
text)
-j, --jobs=NUM              use this many parallel jobs to dump
-v, --verbose               verbose mode
-Z, --compress=0-9          compression level for compressed formats
--lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock
--no-sync                    do not wait for changes to be written safely to disk 1
--help                      show this help, then exit
--version                   output version information, then exit
Options controlling the output content:
-a, --data-only             dump only the data, not the schema
-b, --blobs                 include large objects in dump
-B, --no-blobs              exclude large objects in dump   -c, --clean clean ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기

러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기

류수미, 송희정, 앨런 볼리외
생성형 AI를 위한 프롬프트 엔지니어링

생성형 AI를 위한 프롬프트 엔지니어링

제임스 피닉스, 마이크 테일러

Publisher Resources

ISBN: 9798341655270Supplemental Content