Repository navigation
sqsolve 1.2.0
Fixes from the audit of 2026-10-20 (stability and long-term operation).
- Data safety:
- A failed or repeated restore as new, recreate or library creation no longer drops a
database it did not create (a double click on Recreate could drop the recreated library).
Every restore, revert, delete, recover and purge job checks again, when it runs, that the
library is still in the state it was queued for. - Retry is offered only for jobs that are safe to repeat (backups, verification, export,
import, system maintenance jobs), and Retry and Cancel need the permission of the job's type.
Restores, deletes, purges and reverts are started again from their own form. - A verification that could not run (no space, cancelled, server trouble, sqsolve stopping)
no longer marks a good backup as failed; only a real integrity verdict does. - An import reads the whole archive before cataloguing it, waits until the file stops
growing, and never deletes the user's file if it changed during the import. - Before a previous version (
__prev) is dropped, sqsolve takes a verified backup of it.
A library whose database comes back after being missing returns to Active only when that
database has tables (or the library never had any); one closed to connections is opened only
for that check. An empty, invalid or unreadable database with its name is kept, the library
stays missing and a warning says why. An
interrupted recreate is cleaned up instead of being adopted empty, and a recreate whose
cleanup could not drop the database it created says so in the job error. A library left
"restoring" by a cut goes back to the state it had (maintenance stays maintenance), or to
missing when its database is gone. - A backup cut by a cancel or by a graceful stop (for example an update during the nightly
backup) ends as interrupted and no longer sends an Error notification. - Revoking a member credential reports an error when the revocation cannot be recorded
(SQS-L080), instead of the member getting its login back at the next start. - Maintenance now sets the library roles
NOLOGINand keeps the database open to sqsolve,
so backups, restores and deletes keep working in maintenance (ADR 0024). - The per-library connection limit applies to the library roles, so a busy library can still
be backed up.sqsolve_adminhas 3 reserved connection slots. - Trash and previous-version retention are capped at 3650 days (a larger value overflowed
and purged at once).
- A failed or repeated restore as new, recreate or library creation no longer drops a
- Reconciliation: an interrupted restore, revert, delete or recreate that the start after a cut
cannot settle is tried again at every start until it is settled, and the job purge keeps it
meanwhile. Until then its library keeps its state and access, nothing its journal names is
dropped (SQS-R090for a previous version) and alibrary.reconcile_pendingwarning says
why; a journal tried again never undoes what was done with the library since. A database
checked for adoption always ends closed when it is not adopted, and a reference to a previous
version whose database is gone is forgotten. - Volumes and startup (ADR 0023): the db and app volumes now carry a marker like the backups
volume.initrefuses an empty or foreign db or app volume, refuses swapped mounts, and never
marks an empty backups folder on an installation that already has an identity. A problem with
the backups disk no longer stopsinit(and with it PostgreSQL); sqsolve refuses to write
backups there and raises a critical alert. sqsolve stores the PostgreSQL cluster identifier
and holds if it changes. New variables:SQSOLVE_DB_ADOPT,SQSOLVE_APP_ADOPT,
SQSOLVE_PG_ACCEPT_SYSTEM_ID;SQSOLVE_BACKUPS_ADOPTacceptstruelike the others. - Jobs and alerts: a failed database write no longer crashes the process or leaves a job
"running" forever that stopped its schedule; background loops recover from panics. Jobs cut
by a graceful stop end as interrupted. If PostgreSQL never comes up after a start, a critical
postgres.downis sent after 5 minutes. Notification grouping always delivers an escalation
and sends a summary when the window ends; webhook errors no longer store the URL. Locks of
two accounts, failed-login bursts from two addresses and the expiry of the panel and the
PostgreSQL certificates are no longer merged into one notification, and a second
postgres.downafterpostgres.upis delivered at once. - Health:
GET /api/v1/system/healthreports backup freshness and volume use and answers 503
when one is critical, for uptime monitors; it uses the same staleness rule as the
backup.stalealert. A volume that cannot be measured raises a critical
storage.volume_missing. Health warns when the PostgreSQL server is older than the bundled
pg_dump. - Housekeeping removes the catalog rows of backups deleted more than 365 days ago (the audit log
keeps the history). - Panel certificate: the self-generated certificate is renewed 30 days before it expires.
- Security (ADR 0025): the login lock lasts 15 minutes and no longer closes open sessions or
disables API tokens; password hashing is limited to 4 at a time; the open redirect through
next=is closed; the second factor is enforced for administrators when the setting is on;
common passwords of 8 to 11 characters are refused; installing the panel certificate from
Settings works again. - PostgreSQL: listing databases no longer fails while one is being dropped; a failed
pg_hba.confreload is retried instead of being reported as applied; password rotation and
role creation no longer leave PostgreSQL and the panel disagreeing; admin queries have lock
and statement timeouts; the export closes its snapshot before the download. - Build and deploy: the compose file rotates container logs (10 MB, 5 files) and runs the
sqsolve container withinit: true; Dependabot proposes new digests for the base images and
actions; images are published only after CI passes, and the GitHub release only after the
image; staticcheck runs on the shipped Go version and govulncheck scans the image binary.
Duplicate error codes were renumbered:SQS-B090,SQS-B091andSQS-C100replace the
second meanings ofSQS-B033,SQS-B034andSQS-C010, andmake checknow fails on a
code with two messages. API problems point at/docs/errors/<code>. - All remaining Spanish strings in the interface and logs are now in English.
- Security: the image is built with Go 1.27.3, which fixes GO-2026-6809 (
crypto/x509
certificate verification, used by sqsolve's HTTPS and SMTP clients). The 1.1.2 image was built
with Go 1.27.2. The new CI scan of the binary inside the image found it.
Upgrade: this is a new minor version, so the 1.1 tag does not move to it: change the
x-sqsolve line of your compose file to ghcr.io/donutinit/sqsolve:1.2, then
docker compose pull and docker compose up -d (TrueNAS: edit the app's YAML and Update).
Recommended, from the new deploy/compose.yaml: the x-logging block with logging: *logging
on the three services, and init: true on sqsolve. Copy those lines into your file, or paste
the file and set your three paths, TZ, UID and GID and the IP where 5432 is published again,
keeping the 1.2 tag (the compose file attached to the GitHub release pins the exact version).
Changing the postgres service restarts PostgreSQL: do it when no workstation has a project
open. The PostgreSQL image is the same as in 1.1.2 (postgres:18.6-trixie). Two migrations
(0005, an index on the backups catalog; 0006, the reconciliation flag of interrupted jobs).
At the first start
init writes the db and app markers by itself. The 3 reserved connections take effect the next
time PostgreSQL restarts (docs/07 §10). An uptime monitor on GET /api/v1/system/health now
also gets 503 for a stale library or a volume at 90 %.
Rollback: first reopen every library in maintenance (1.1.2 does not give the library roles
LOGIN back when maintenance ends). Then use image 1.1.2 with the SQLite copy
app/state-backups/sqsolve-before-0005-*.db (docs/runbooks/upgrade.md); 1.1.2 refuses the
migrated catalog (SQS-X012). Changes made since the upgrade are lost with the copy; "Rebuild
the catalog" brings back the backups taken since. Under 1.1.2, a library that the restored
catalog shows in maintenance accepts connections: reopen it and put it back in maintenance.