Skip to content

vibepg restore ​

Synopsis ​

bash
vibepg restore <name> <input> [--clean] [--no-owner] [--jobs <n>]

Description ​

Restore a database from a dump file or stdin. vibepg auto-detects the format — plain SQL files are piped through psql, archive formats (custom, tar, directory) are restored with pg_restore.

Arguments ​

NameRequiredDescription
nameyesInstance name
inputyesInput path. - means stdin.

Options ​

FlagTypeDefaultDescription
--cleanboolfalseDrop existing objects before recreating them. pg_restore only.
--no-ownerboolfalseDon't try to set object ownership. pg_restore only.
--jobsu32(none)Parallel restore workers. Archive formats only.

Examples ​

bash
# Auto-detect format from a file
vibepg restore demo backup.dump

# From stdin
cat backup.sql | vibepg restore demo -

# Replace existing objects, parallel restore
vibepg restore demo backup.dump --clean --jobs 4

# Restore without owner mappings (useful when moving between instances)
vibepg restore demo backup.dump --no-owner

Notes ​

  • --clean is destructive — existing tables and their data are dropped before the restore. Double-check the target instance.
  • The plain-SQL path doesn't honor --clean, --no-owner, or --jobs (those are pg_restore features). Use a custom-format dump if you need them.
  • Restore runs inside the container, matching the instance's Postgres version.

See also ​

Released under the MIT License.