pg_dumpall 參數表
參數 說明 範例
-U 指定連線使用者 pg_dumpall -U postgres
-h 指定主機位置 pg_dumpall -h 127.0.0.1
-p 指定連線埠號 pg_dumpall -p 5433
-f 輸出檔案 pg_dumpall -f alldb.sql
-v 顯示詳細執行過程 pg_dumpall -v
-g / --globals-only 只匯出全域物件 (roles, tablespaces) pg_dumpall -g
-r / --roles-only 只匯出角色 pg_dumpall -r
-t / --tablespaces-only 只匯出 tablespaces pg_dumpall -t
-s / --schema-only 只匯出 schema (不含資料) pg_dumpall -s
-a / --data-only 只匯出資料 (不含 schema) pg_dumpall -a
-c / --clean 在 dump 中加入 DROP 指令 pg_dumpall -c
--if-exists DROP 指令加上 IF EXISTS pg_dumpall --clean --if-exists
-C 在 dump 中加入 CREATE DATABASE pg_dumpall -C
--column-inserts 使用明確欄位名稱的 INSERT 語法 pg_dumpall --column-inserts
--inserts 使用 INSERT 而非 COPY pg_dumpall --inserts
--rows-per-insert 每個 INSERT 包含的資料列數 pg_dumpall --rows-per-insert=100
--no-owner 不輸出物件擁有者資訊 pg_dumpall --no-owner
--no-privileges 不輸出 GRANT/REVOKE pg_dumpall --no-privileges
--no-comments 不輸出 COMMENT pg_dumpall --no-comments
--binary-upgrade 用於版本升級的特殊模式 pg_dumpall --binary-upgrade
--disable-triggers 在匯入時停用觸發器 pg_dumpall --disable-triggers
--no-security-labels 不輸出安全標籤 pg_dumpall --no-security-labels
--no-tablespaces 不輸出 tablespace 指令 pg_dumpall --no-tablespaces
--quote-all-identifiers 所有識別字加上引號 pg_dumpall --quote-all-identifiers
--lock-wait-timeout 設定 lock 等待時間 pg_dumpall --lock-wait-timeout=5000
--no-sync 匯出後不執行 fsync pg_dumpall --no-sync
創作者介紹
創作者 mitblog 的頭像
mitblog

香腸炒章魚

mitblog 發表在 痞客邦 留言(0) 人氣(3)