[PostgreSQL] DB 백업 및 MySQL로의 이전 0 0 5,237

by 김정식 [MySQL 노하우/팁/자료] PostgreSQL [2008.07.10 20:51:03]


pg_dump --help
pg_dump dumps a database as a text file.

Usage:
  pg_dump [options] dbname

Options:
  -a                       dump out only the data, no schema
  -b                       dump out blob data
  -c                       clean (drop) schema prior to create
  -C                       output commands to create database
  -d                       dump data as INSERT, rather than COPY, commands
  -D                       dump data as INSERT commands with attribute names
  -f FILENAME              specify output file name
  -F {c|t|p}               output file format (custom, tar, plain text)
  -h HOSTNAME              server host name
  -i                       proceed when database version != pg_dump version
  -n                       suppress most quotes around identifiers
  -N                       enable most quotes around identifiers
  -o                       dump object ids (oids)
  -O                       do not output \connect commands in plain text
                           format
  -p PORT                  server port number
  -R                       disable ALL reconnections to the database in
                           plain text format
  -s                       dump out only the schema, no data
  -S NAME                  specify the superuser user name to use in plain
                           text format
  -t TABLE                 dump for this table only (* for all)
  -u                       use password authentication
  -v                       verbose
  -x                       do not dump ACL's (grant/revoke)
  -Z {0-9}                 compression level for compressed formats

If no database name is not supplied, then the PGDATABASE environment
variable value is used.


-- script 파일로 백업 받는다.
pg_dump -f [파일명] -d -u [DB Name]


 

 

댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입