Backup & Recovery
Create and restore PostgreSQL database backups in tpaw using pg_dump and pg_restore.
The Backup panel provides a graphical interface for pg_dump and pg_restore. Create a full database dump, schedule regular backups, or restore from a previous backup — all without writing shell commands.
Requirements
tpaw uses the pg_dump and pg_restore command-line tools that come with PostgreSQL. They must be installed and accessible on your system.
macOS installation:
Verify installation:
If tpaw can't find pg_dump, check that /usr/local/bin or /opt/homebrew/bin is in your PATH.
Creating a backup
- Open the Backup panel from the Monitor section
- Click Create Backup
- In the backup modal, configure:
- Version — PostgreSQL version for the pg_dump binary (auto-detected from server)
- Scope — Full (schema + data), Schema only, or Data only
- Compression — 0 (none), 1 (fast), 6 (default), 9 (max)
- Options — No owner, Clean (DROP before restore), If exists
- Click Backup and choose an output file path
tpaw runs pg_dump in the background and shows progress. A status bar at the bottom of the screen tracks ongoing backups.
Backup scope options
| Scope | What it includes | Use case |
|---|---|---|
| Full (schema + data) | Complete schema and all data | Standard database backup |
| Schema only | Table/index/constraint definitions, no data | Copy DB structure to another environment |
| Data only | Row data only, no DDL | Migrate data into an existing schema |
pg_dump not found
If tpaw shows "pg_dump not found", install the PostgreSQL client tools:
Or download Postgres.app which includes pg_dump. Restart tpaw after installation.
Restoring from a backup
- Click Restore in the Backup panel
- Select a backup file (
.dumpor.sql) - For
.dumpfiles, tpaw shows a restore preview — a list of objects that will be restored - Review the preview and click Confirm Restore
tpaw runs pg_restore (for .dump files) or executes the SQL file directly (for .sql files).
Warning: Restore is destructive. Restoring will overwrite existing data. Use with caution on production databases.
Backup history
The Backup panel shows a list of recent backups with:
- File path
- Creation timestamp
- File size
- Status (success / in progress / failed)
Scheduled backups
tpaw supports scheduled backups on a configurable interval. To set up a schedule, click Schedule in the backup panel and choose a frequency (daily, hourly, etc.) and output directory.
Monitoring backup progress
Active backups show a progress indicator in the Backup panel and a status bar at the bottom of the app window. You can continue using tpaw normally while a backup runs.
Troubleshooting
pg_dump: not found
Install PostgreSQL client tools: brew install postgresql
connection refused
Ensure tpaw is connected to the database before starting a backup.
Backup fails with permission denied
Check that the PostgreSQL user has pg_dump rights. The user needs at least SELECT on all tables and CONNECT on the database.