如何在postgres数据库中创建单个表的备份? [英] How to create a backup of a single table in a postgres database?
本文介绍了如何在postgres数据库中创建单个表的备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用postgres在数据库中创建单个表的备份?如何?
Is there a way to create a backup of a single table within a database using postgres? And how? Does this also work with the pg_dump command?
推荐答案
使用-table
告诉 pg_dump
它必须备份什么表:
Use --table
to tell pg_dump
what table it has to backup:
pg_dump --host localhost --port 5432 --username postgres --format plain --ignore-version --verbose --file "<abstract_file_path>" --table public.tablename dbname
这篇关于如何在postgres数据库中创建单个表的备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文