Skip to content

Recovery ​

A store was lost: what is gone, what comes back by itself, and the steps. Restoring from a backup is in Backups and retention.

Redis came back empty ​

A restart without persistence, a failover to a replica without data, or a flush.

Lost.

  • Queued, delayed, retrying and running jobs, and the dead letters. Whoever enqueued the work must enqueue it again.
  • Workflow runs and their history.
  • Schedule state: pauses are forgotten, so every schedule runs again.
  • Alert rules: define them again.
  • Session revocations: a session that was signed out works again until it expires (an hour by default). Accounts that were deactivated, demoted or erased stay refused.
  • Unused invite codes, pending password-reset and confirmation links, and sign-ins in progress.

Back by itself.

  • Schedules from the configuration, the list of workers (they register again), counters and the leader leases (within 30 seconds).
  • SDK workflow blueprints: every SDK worker registers them again when it starts.

Untouched. Accounts, tokens, the audit trail, notification channels and settings are in PostgreSQL.

What to do.

  1. Bring Redis back, with persistence on this time (Capacity).
  2. Restart the server instances and the workers, so that they register again.
  3. Check GET /api/v1/capabilities and the console's Workers page.
  4. Tell the owners of the jobs what was lost. Define alert rules again, and pause again the schedules that were paused.

PostgreSQL was lost ​

Restore the last dump (Backups and retention). Everything after it is gone: accounts created since, token revocations since, audit rows since. Redis and the jobs in it are unaffected.

Do not run the server against an empty database in the meantime, unless you mean to start over: the first account made on an empty database is an admin.

The data volume or its key is lost ​

What you see. The server exits at start with one of:

  • ERROR: /data/joobqui.conf exists but its key is missing (JOOBQUI_BOOTSTRAP_KEY or /data/joobqui.key)
  • ERROR: /data/joobqui.conf cannot be opened with this key (wrong JOOBQUI_BOOTSTRAP_KEY or joobqui.key, or the file was changed)
  • ERROR: /data/joobqui.conf cannot be opened with this key (the file opened, but it was saved for something else)

Why. The settings file on the data volume is encrypted with a key kept beside it (joobqui.key) or given in JOOBQUI_BOOTSTRAP_KEY. The key is missing, is another one, or the file was changed.

What to do.

  1. If you set JOOBQUI_BOOTSTRAP_KEY, check it is the value the file was saved with. If you restored /data from a backup, restore joobqui.key with it (or the JOOBQUI_BOOTSTRAP_KEY you kept outside).
  2. If neither can be found, the saved settings are lost. Move joobqui.conf out of the data directory (or empty the volume) and start the server: it opens the setup page; enter the connections and Sign in with JoobQ again (an admin of your organization approves the reconnect). The server generates new secrets: everyone has to sign in again, and the secrets saved before under the old keys cannot be read any more: notification-channel secrets, secret settings of the Settings page (such as the mail password and the SDK token: the server warns and ignores them; save them again) and two-factor secrets (an admin resets the two-factor authentication of those who used it). Jobs whose arguments were sealed with the old payload key cannot run. The rest of the data in PostgreSQL and Redis is kept.

A payload key was lost ​

Jobs sealed with a key that is no longer in JOOBQUI_PAYLOAD_KEYS cannot run: each goes to the dead letters, still sealed, with "was sealed with key ..., which is not configured". Put the key back and retry them from the dead-letter page; without the key their arguments are gone.

An account was erased by mistake ​

Erasure cannot be undone. Restore the account from a PostgreSQL backup, or create it again.