zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

postgresql如何备份表

2023-04-18 14:24:54 时间

postgresql如何备份表

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