pg_dump 명령으로 데이터베이스를 백업합니다.
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.
Report bugs to <pgsql-bugs@postgresql.org>
MS-SQL로 이전할 경우에는...
pg_dump -f [파일명] -d -u [DB Name]
로 INSERT 문으로 덤프하여 쿼리 분석기 등에서 INSERT 를 실행하면 이전이 가능합니다.
'프로그래밍' 카테고리의 다른 글
자바스크립트로 ContextMenu 및 특수키 입력 제한 풀기 (0) | 2008.02.21 |
---|---|
detour - WIN32 API Trace Utility (0) | 2007.12.22 |
InstallShield 7.0에서 IE창 닫은후 프로그램 제거하기 (0) | 2007.12.22 |
InstallShield 7.0 Pro 버전에서 언인스톨 아이콘(Add Uninstall Shortcut) (0) | 2007.12.22 |
PostgreSQL OLEDB 연결 정보 설정 (0) | 2007.12.21 |