admin管理员组文章数量:1568432
pg
- pg_dump 备份多张表到同一个文件
PGPASSWORD='password' pg_dump -t 'thr_*' -t ellll -d dbName -U userName > /tmp/db_dump.sql
上面命令将所有以thr开头的表以及ellll表备份到sql文件
2. pg_dump备份多张表到不同文件
for table in public.haha public.test; do PGPASSWORD='haha' pg_dump -t $table -U username -d postgres --data-only --inserts > /tmp/$table.sql; done;
本文标签: pg
版权声明:本文标题:pg 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1717388060a566441.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论