postgresql如何备份表[postgresql教程]

python

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入门教程,欢迎在线学习!

以上是 postgresql如何备份表[postgresql教程] 的全部内容, 来源链接: utcz.com/z/526105.html

回到顶部