postgresql如何备份表
爱喝马黛茶的安东尼
2019-12-18 11:23:353748浏览 · 0收藏 · 0评论
postgresql数据库表的备份与还原
备份:
pg_dump -U postgres -t shipping_shiptype_to_country -f ./shipping_shiptype_to_country.sql futures_data
其中:
-U:表示用户名
-f:指定输出文件
futures_data:该表从属于的数据库名
恢复:
psql -U postgres -d futures_data_online -f ./shipping_shiptype_to_country.sql
说明:
-U:表示数据库用户名
-d:指定要恢复到的数据库名
-f:指定要恢复的xxx.sql文件名称
Python学习网,大量的免费PostgreSQL入门教程,欢迎在线学习!
关注公众号,随时随地在线学习