論理バックアップ
postgresの=#SELECT * FROMトンから。 ID | 名前 ---- + ------ 1 | HTTP 2 | qdds (2行) postgresの=#1 \リットル データベースのリスト 名前| 所有者| エンコーディング| 照合| CTYPE | アクセス権 ----------- + ---------- + ---------- + ------------- + - ----------- + ----------------------- postgresの| postgresの| UTF8 | EN_US.UTF-8 | EN_US.UTF-8 | template1では| postgresの| UTF8 | EN_US.UTF-8 | EN_US.UTF-8 | = C / Postgresの+ | | | | | postgresの= CTC / postgresの template1 | postgresの| UTF8 | EN_US.UTF-8 | EN_US.UTF-8 | = C / Postgresの+ | | | | | postgresの= CTC / postgresの (3行) postgresの=#\ D 関係のリスト スキーマ| 名前| タイプ| オーナー -------- + ------ + ------- + ---------- 公共| トン| 表| postgresの (1行) | pg_dumpの-p 5432 --inserts --column-インサートは、postgresのを-d GZIP> /u01/pgsql/backup/dump.sql.gz
論理回復
[redis01バックアップ@ postgresの] $ gzipの-d /u01/pgsql/backup/dump.sql.gz $ pg_restoreの-p 5432 -C -d postgresの[redis01バックアップ@ postgresの] /u01/pgsql/backup/dump.sql pg_restoreの:[アーカイバ]入力ファイルはテキスト形式のダンプのように見えます。psqlを使用してください。 $ psqlと[redis01バックアップ@ Postgresは] 5432は、-d -pのpostgres -f /u01/pgsql/backup/dump.sql セットする セットする セットする セットする セットする set_config関数 ------------ (1行) セットする セットする セットする セットする セットする セットする CREATE TABLEを 他の机 INSERT 0 1 INSERT 0 1 他の机
データベース(またはオブジェクトの一部)が復元PSQLのために、テキストファイルのスクリプトとしてエクスポート。
データベース(またはオブジェクトの一部)がpg_restoreのを使用して復元し、アーカイブファイルとしてエクスポート。
他のファイル形式へのエクスポート
pg_dumpの-p 5432 -Fc -d postgresの> /u01/pgsql/backup/dump.dmp [redis01バックアップ@ postgresの] $ pg_restoreの-p 5432 -d postgresの/u01/pgsql/backup/dump.dmp
コールドスタンバイ物理バックアップ
pg_ctlが停止 -cvjpf /u01/pgsql/colddata.tar.gzデータを取り pg_ctlがスタート 回復