dump
Create dumps with pg_dump, delete ones you no longer want, and list past
dumps. Dumping requires the pg_dump binary on your PATH and a PostgreSQL
connection. This command group is restricted to PostgreSQL.
Usage
dbmux dump <subcommand> [options]Three subcommands exist: create, delete, and history.
dump create
dbmux dump create [options]| Option | Alias | Type | Description |
|---|---|---|---|
--database | -d | string | Database to dump |
--connection | -n | string | Named saved connection to use |
--format | -f | custom | plain | directory | tar | Dump format, defaults to custom |
--output | -o | string | Base name for the output file |
--verbose | boolean | Show pg_dump output |
Without -d, dbmux fetches the live databases and shows an interactive
picker that includes each database's size and owner.
The output filename always ends with a timestamp and the .dump extension,
regardless of --format. Passing -o sets the base name; dbmux still appends
the timestamp and extension unless your -o name already includes its own
extension.
Without -o, dbmux prompts you for a filename and asks you to confirm
before dumping.
Dumps that reach execution are recorded in the dump history, failures
included. Earlier exits, like a missing pg_dump or no configured
connection, leave no history entry.
Examples
Pick a database interactively:
dbmux dump createDump a named database:
dbmux dump create -d myapp_productionSet the base name and let dbmux add the timestamp:
dbmux dump create -d mydb -o my-backupWrite a plain SQL dump with full output:
dbmux dump create -d mydb --format plain --verboseDump through a named connection:
dbmux dump create -n production -d mydbdump delete
dbmux dump delete [options]| Option | Alias | Type | Description |
|---|---|---|---|
--file | -f | string | Dump file to delete |
--force | -F | boolean | Skip the confirmation prompt |
-f accepts absolute paths, paths relative to ~/.dbmux/dumps/, or paths
relative to the current directory. Without -f, dbmux shows an interactive
picker of dump files ending in .dump, .dmp, .sql, .gz, or .tar.
Deleting asks for confirmation unless you pass -F. The matching history
entry gets marked as deleted.
Examples
Pick a file interactively:
dbmux dump deleteDelete a named dump from the dumps folder:
dbmux dump delete -f backup.dumpDelete without the confirmation prompt:
dbmux dump delete -f backup.dump -Fdump history
dbmux dump history [options]| Option | Alias | Type | Description |
|---|---|---|---|
--limit | -l | number | Entries to show |
--format | -f | table | json | Output format |
Prints the same listing as dbmux history list -t dump.
Example
dbmux dump history -l 5 -f jsonRelated commands
- restore brings dumps back into databases.
- history lists records across dumps and restores.
- configuration shows where dump files land.