Repository navigation
Releases
v1.2.1
self-updatenow tracks the newest published release instead of themain
branch;--main(orDBTOOL_UPDATE_CHANNEL=main) follows the branch, and
DBTOOL_UPDATE_URLstill overrides both.DBTOOL_REPOpoints it at a fork.- Pushing a
vX.Y.Ztag publishes the GitHub release: the workflow refuses a tag
that disagrees withDBTOOL_VERSION, takes the notes from this file, and attaches
dbtool.shandinstall.sh.
v1.2.0 — whole-server backups, discover, preflight
Back up every database on a server, and prove it will work before you trust the schedule.
all_databases: true turns an entry into a whole server. dbtool asks pg_database (or SHOW DATABASES) on every run, so a database created later is backed up without a config change. include_databases / exclude_databases take globs. Each database becomes its own dump labelled <entry>_<db>, so retention, restore and verification stay per-database.
discover [name|all] [--url DSN] lists what a server actually holds, with sizes, marks everything the config does not cover, and prints an entry to paste. Works against a URL that is not in the config.
test --deep checks what decides whether a schedule works: maintenance-database access (enumeration, --create, --drop), whether the role is superuser and may create databases, how many databases it may CONNECT to, whether the local client can dump this server version or needs a container — then runs a real --schema-only dump of each database. Non-zero exit, so it can gate cron.
Updating in one command: sudo ./install.sh (never overwrites an existing dbtool.yml / dbtool.env), or sudo dbtool self-update on a box without a checkout. self-update --check exits 10 when an update is due.
Also: maintenance_db setting, and a whole-server entry is no longer a lookup group — prune takes its groups from each sidecar's label, and --latest <server-entry> refuses with the usable labels.
v1.1.0 — integrity fixes
Integrity and correctness fixes surfaced by the first real deployment.
A truncated dump was reported as a successful backup. backup_one ran as an if condition, which suppresses set -e inside the subshell, so a pg_dump killed by the timeout fell through to the rename; verification then only listed the archive header, which a truncated dump still answers. Dumps are now read back in full (verify: full|header|none).
--latest could restore a different database, and prune could delete the only copy of one: both globbed <entry>_*, which matches a longer sibling entry (app vs app_archive).
Also in this release:
globals— cluster roles and grants, included inbackup allflockon the backup directory; directory dumps stage next to the backups, not in/tmp- dry runs no longer create
.partfiles, and orphans left by a crash are swept - a failed connection reports the real cause ("Connection refused", "password authentication failed") instead of a generic message
Install: git clone https://github.com/deziss/dbtool.git && cd dbtool && sudo ./install.sh