pg_dump 备份恢复单个表单数据
/opt/PostgreSQL/9.0/bin/pg_dump --host localhost --port 5432 --username postgres --format custom --verbose --file "/home/Gogo_yueyue/桌面/province_table" --table public.province_table edu
pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined operator families
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "province_table"
pg_dump: finding default expressions of table "province_table"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "province_table"
pg_dump: reading constraints
pg_dump: reading foreign key constraints for table "province_table"
pg_dump: reading triggers
pg_dump: reading triggers for table "province_table"
pg_dump: reading dependency data
pg_dump: saving encoding = UTF8
pg_dump: saving standard_conforming_strings = off
pg_dump: dumping contents of table province_table
进程退出并返回 0。
--------------------------------------------------------------------------/opt/PostgreSQL/9.0/bin/pg_restore --host 172.29.0.3 --port 5432 --username postgres --dbname edu --data-only --table city_table --schema public --verbose "/home/Gogo_yueyue/桌面/city_table"pg_restore: connecting to database for restorepg_restore: restoring data for table "city_table"pg_restore: setting owner and privileges for TABLE DATA city_table进程退出并返回 0。
?