Skip to content

MongocampMaintenance ​

Backups and migrations of the server (MongoCamp 2.11), for administrators. A known non-administrator gets a note and no request is sent.

vue
<MongocampMaintenance />
<MongocampMaintenance hide-heading @changed="reloadSomethingElse" />
PropDefaultDescription
hideHeadingfalseHides the "Maintenance" heading; the toolbar stays.
hideRefreshfalseHides the reload button (call the exposed refresh()).
EventWhen
changedA backup was written or migrations ran, and both lists were reloaded.

Backups — the stored backups, newest first: when, how many collections (their names as the tooltip) and documents, the database and the backup's id. Back up now writes one (the server's BACKUP_COLLECTIONS, by default the declared and the internal collections, as gzipped canonical Extended JSON into the bucket <AUTH_PREFIX>backups or BACKUP_DIRECTORY; it keeps BACKUP_RETENTION). While another instance writes one the server answers 409 — an info, not an error. Restoring a backup is a server command (mongocamp restore), so it is not offered here.

Migrations — every migration the server defines or has recorded, in id order, with its state (applied, pending, failed, changed since — applied, but its source changed later) and when it ran and how long it took; a failed one shows its error as the badge's tooltip. Run pending (after a confirmation) applies the pending and failed ones in id order; the server waits for another instance that runs them.

The toolbar slot sits after the reload button. Data: useMongocampMaintenance. The module's navigation lists it in the Server group under paths.maintenance (default /secured/admin/maintenance) — an app still needs a page there.

Root class mongocamp-maintenance; parts heading, toolbar, table, empty.

Released under the MIT License.