# Postgres: Backup and Restore **Published by:** [Suyi](https://paragraph.com/@suyi-cn/) **Published on:** 2023-02-26 **URL:** https://paragraph.com/@suyi-cn/postgres-backup-and-restore ## Content backup and restore with postgres# dump to sql $ pg_dump -h localhost -d postgres --username postgres -t '"Orders"" > public_orders.sql # restore from sql $ psql -h localhost -U postgres -d postgres < public_orders.sql $ pg_restore -U postgres -d postgres -1 public_orders.sql ## Publication Information - [Suyi](https://paragraph.com/@suyi-cn/): Publication homepage - [All Posts](https://paragraph.com/@suyi-cn/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@suyi-cn): Subscribe to updates