This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| quickref:postgres [2025-12-23 Tue 20:38] – [Create Role & DB] rolename missing theorytoe | quickref:postgres [2026-11-19 Thu 03:33] (current) – demon-machine | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| ALTER TABLE < | ALTER TABLE < | ||
| ALTER TABLE < | ALTER TABLE < | ||
| + | </ | ||
| + | |||
| + | ===== Backup / Restore ===== | ||
| + | < | ||
| + | # Dump full db | ||
| + | pg_dump -U < | ||
| + | |||
| + | # Table, schema, or data only | ||
| + | pg_dump -U < | ||
| + | pg_dump -U < | ||
| + | pg_dump -U < | ||
| + | |||
| + | # Custom format (restore with pg_restore) | ||
| + | pg_dump -U < | ||
| + | |||
| + | # Restore | ||
| + | psql -U < | ||
| + | pg_restore -U < | ||
| </ | </ | ||