Restore Flags
Every pg_restore flag pgbr exposes, the argument it produces, and the rules between them.
Restore flags map onto pg_restore arguments. This page is the complete list;
Restoring backups covers when to use them.
The same set is used by restores and the target side of a migration.
Format
Prop
Type
There is no plain option — plain SQL isn't an archive pg_restore reads. pgbr
detects a .sql artifact and runs psql instead.
For a tracked backup, this field is ignored: pgbr uses the format recorded on the backup row. It only matters for a custom upload, where there's no record to consult.
Safety
Both default to on. Together they make a failed restore a non-event.
Prop
Type
Turning both off gives you pg_restore's real defaults: continue past errors,
commit what worked, exit 0. That's a partially restored database reporting
success. pgbr's defaults are deliberately stricter than the tool's.
These two are also the only flags that survive a psql restore, as -1 and
-v ON_ERROR_STOP=1.
Conflict handling
Prop
Type
clean drops data. It issues DROP against every object in the dump before
recreating it. On the wrong target that is exactly the disaster a backup tool
exists to prevent.
Clean without If exists errors on objects that aren't there — which, with Exit on error on, fails the restore. Enable both together.
Content selection
Prop
Type
disableTriggers only applies to data-only restores. Without it, a data-only
restore fires foreign-key triggers on every row — slow, and it can fail on rows
inserted before their referents exist.
Performance
Prop
Type
Parallel restore works from custom and directory formats. It cannot be combined
with singleTransaction — that's a genuine tradeoff, not a limitation: you're
choosing speed over all-or-nothing.
Filters
Prop
Type
There is no exclude-tables option — pg_restore has no -T. Selective restore
from a full custom-format dump is the main reason to prefer that format.
excludeSchemas is accepted by the schema and passed as -N, but pg_restore
only gained -N in PostgreSQL 10. Older clients will reject it.
Validation rules
Enforced by a shared Zod schema in both the dashboard and the worker.
| Rule | Message |
|---|---|
jobs > 1 forbids singleTransaction | Parallel restores (jobs > 1) cannot be run within a singleTransaction. |
dataOnly and schemaOnly are exclusive | Cannot specify both dataOnly and schemaOnly. |
ifExists requires clean | The ifExists flag is only valid when the clean flag is also true. |
Argument order
pg_restore -d "postgresql://..." --clean --if-exists --verbose \
--single-transaction --exit-on-error /tmp/pgbr-restore-xyz/artifact.backupThe connection URL comes right after -d; the artifact path is the last
positional argument. For migrations the path is empty and stripped, so
pg_restore reads its stdin.
Migration override
The migration path forces jobs to 1 on the restore side — a pipe can't be
seeked, so parallel restore is impossible.
pgbr