---
title: "adonia-backups API"
image: "https://adonia.pages.dev/og.png"
version: "next"
---

> Documentation Index
> Fetch the complete documentation index at: https://adonia.pages.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# adonia-backups API

<!-- Generated by docs/site/scripts/generate_api.ts. Do not edit. -->

Canonical inventory of every public subpath and TypeScript export in `adonia-backups`.

## `adonia-backups`

| Export | Kind | Source | Summary |
| --- | --- | --- | --- |
| `ActiveLucidDatabase` | type-only interface | `packages/backups/src/database.ts:8` | Structural subset of Lucid's Database service needed for driver detection. |
| `ADONIA_BACKUPS_CONTROLLER_BINDING` | constant | `packages/backups/src/index.ts:36` | Container binding for the host's authenticated backup route controller. |
| `ADONIA_BACKUPS_RUNTIME_BINDING` | constant | `packages/backups/src/runtime.ts:25` | Application container binding reconstructed in web, command, and worker processes. |
| `authorizeBackup` | function | `packages/backups/src/authorization.ts:31` | Enforces the host's explicit authorization callback. |
| `BACKUP_RUN_ACTION` | constant | `packages/backups/src/runtime.ts:22` | Reserved action name dispatched through Adonia's action-job system. |
| `BackupAbility` | type-only type | `packages/backups/src/authorization.ts:7` | Capabilities exposed by the bundled backup routes and resource action. |
| `BackupAuthorization` | type-only type | `packages/backups/src/authorization.ts:13` | Browser input never grants access; the host authorizer decides every ability. |
| `BackupAuthorizationError` | class | `packages/backups/src/authorization.ts:20` | Authorization failure carrying an HTTP-compatible status without leaking a record key. |
| `BackupDatabaseDriver` | type-only type | `packages/backups/src/database.ts:5` | Database families supported by the backup and restore engines. |
| `BackupDatabaseError` | class | `packages/backups/src/database.ts:25` | Error raised before any artifact is written for an invalid or unsupported connection. |
| `backupDiskDoctorCheck` | constant | `packages/backups/src/doctor.ts:215` | Default manifest check; configured manifests may replace it with a remote Drive probe. |
| `backupDownloadFilename` | function | `packages/backups/src/download.ts:18` | Builds a safe archive filename for a backup download. |
| `BackupDownloadRecord` | type-only type | `packages/backups/src/download.ts:6` | Minimum persisted fields needed to issue a signed artifact URL. |
| `BackupDriveDisk` | type-only interface | `packages/backups/src/engine.ts:35` | Streaming subset implemented by an `@adonisjs/drive` disk. |
| `BackupEngine` | class | `packages/backups/src/engine.ts:345` | Creates private gzip artifacts and restores them after full checksum verification. Restore is destructive: callers must close database clients and obtain the exact confirmation phrase before invoking it. |
| `BackupEngineOptions` | type-only interface | `packages/backups/src/engine.ts:74` | Construction options shared by command, HTTP, and worker runtimes. |
| `BackupNotFoundError` | class | `packages/backups/src/controller.ts:67` | Missing records stay panel-scoped and never reveal a Drive key. |
| `BackupRecord` | class | `packages/backups/src/backup_record.ts:35` | Persistence record for a private compressed database dump. |
| `BackupRecordRepository` | type-only interface | `packages/backups/src/backup_record.ts:104` | Persistence boundary shared by web, command, and worker runtimes. |
| `BackupRuntimeError` | class | `packages/backups/src/engine.ts:89` | A backup or restore failure safe to surface in an operator log. |
| `BACKUPS_MIGRATIONS` | constant | `packages/backups/src/index.ts:31` | Absolute directory containing the package's publishable Lucid migration. |
| `BACKUPS_VERSION` | constant | `packages/backups/src/version.ts:2` | Package version generated from package.json; do not edit directly. |
| `BackupsControllerOptions` | type-only interface | `packages/backups/src/controller.ts:49` | Runtime services required by the built-in route controller. |
| `backupsManifest` | constant | `packages/backups/src/index.ts:63` | Unconfigured installable manifest. Routes inherit panel guards and resolve a host-bound controller; workers reconstruct the runtime in their process. |
| `BackupsManifestRouteContext` | type-only interface | `packages/backups/src/index.ts:39` | Request context resolved by manifest-contributed guarded panel routes. |
| `backupsPlugin` | function | `packages/backups/src/index.ts:107` | Builds a manifest that registers the resource and can probe its Drive disk. |
| `BackupsPluginOptions` | type-only interface | `packages/backups/src/index.ts:91` | Configured manifest options for the bundled admin resource. |
| `BackupsResourceOptions` | type-only interface | `packages/backups/src/resource.ts:23` | Required installation options for the bundled records resource. |
| `BackupsRouteContext` | type-only interface | `packages/backups/src/controller.ts:25` | HTTP context methods used by the manifest-contributed routes. |
| `BackupsRouteController` | type-only interface | `packages/backups/src/controller.ts:41` | Host controller contract resolved by the package manifest. |
| `BackupsRuntimeContract` | type-only interface | `packages/backups/src/runtime.ts:28` | Runtime API hosts bind once with their configured Lucid and Drive services. |
| `BackupStatus` | type-only type | `packages/backups/src/backup_record.ts:6` | Lifecycle states persisted for every attempted backup. |
| `BackupSubject` | type-only type | `packages/backups/src/authorization.ts:10` | Record subject accepted by route snapshots and Lucid resource instances. |
| `backupWorkerHandler` | constant | `packages/backups/src/runtime.ts:103` | Manifest handler that reconstructs the configured runtime inside the worker process. |
| `configure` | function | `packages/backups/src/index.ts:86` | Ace configure hook that publishes this plugin's attached migration. |
| `createBackupDiskDoctorCheck` | function | `packages/backups/src/doctor.ts:159` | Creates a writable-disk check. Passing `probe` lets a configured manifest test S3 or another remote Drive disk; the default statically probes a local Drive location when one can be resolved from `config/drive`. |
| `CreateBackupRecord` | type-only type | `packages/backups/src/backup_record.ts:96` | Values required when an attempted backup is first persisted. |
| `createBackupsResource` | function | `packages/backups/src/resource.ts:125` | Creates a panel-scoped, read-only backup catalog with an authorized signed download action. The opaque Drive key is intentionally absent from schema. |
| `databaseBinary` | function | `packages/backups/src/database.ts:191` | Native client executable required for a database operation. |
| `DefaultBackupsController` | class | `packages/backups/src/controller.ts:108` | Concrete server-side implementation for the manifest's guarded panel routes. Every method authorizes against a trusted configured panel before touching Drive. |
| `DefaultBackupsRuntime` | class | `packages/backups/src/runtime.ts:46` | Default runtime shared by HTTP, Ace, and separately booted queue workers. |
| `DefaultBackupsRuntimeOptions` | type-only interface | `packages/backups/src/runtime.ts:36` | Dependencies for the default runtime implementation. |
| `detectActiveDatabase` | function | `packages/backups/src/database.ts:177` | Returns a secret-free summary suitable for logs and admin records. |
| `DetectedDatabase` | type-only interface | `packages/backups/src/database.ts:17` | Secret-free summary of the active write connection. |
| `dumpBinaryDoctorCheck` | constant | `packages/backups/src/doctor.ts:80` | Checks the native dump executable required by the configured active driver. |
| `formatBackupSize` | function | `packages/backups/src/resource.ts:41` | Human-readable IEC size used by the resource's computed table cell. |
| `LucidBackupRecordRepository` | class | `packages/backups/src/backup_record.ts:132` | Lucid implementation backed by the package migration's `adonia_backups` table. |
| `probeBackupDisk` | function | `packages/backups/src/doctor.ts:125` | Performs an actual private write/delete probe against an `@adonisjs/drive` disk. |
| `probeDatabaseBinary` | function | `packages/backups/src/doctor.ts:24` | Tests executable discovery without invoking a shell. |
| `pruneBackups` | function | `packages/backups/src/retention.ts:34` | Keeps the newest `N` completed backups for one panel. Drive deletion happens before record deletion so a storage failure never leaves an untracked artifact. |
| `PruneBackupsOptions` | type-only interface | `packages/backups/src/retention.ts:9` | Dependencies and scope for one retention pass. |
| `PruneBackupsResult` | type-only interface | `packages/backups/src/retention.ts:20` | Observable result of a completed retention pass. |
| `PublicBackupRecord` | type-only type | `packages/backups/src/controller.ts:38` | Public record shape that deliberately excludes the opaque Drive object key. |
| `registerBackupsResource` | function | `packages/backups/src/index.ts:97` | Registers the panel-scoped backup resource through the manifest server ABI. |
| `RestoreBackupOptions` | type-only interface | `packages/backups/src/engine.ts:67` | Required destructive restore guard and optional target connection. |
| `restoreConfirmationToken` | function | `packages/backups/src/engine.ts:311` | Exact operator phrase required before destructive restore begins. |
| `RunBackupOptions` | type-only interface | `packages/backups/src/engine.ts:59` | User-controlled values accepted when creating a backup. |
| `signedBackupDownload` | function | `packages/backups/src/download.ts:31` | Signs a completed private Drive object. The caller must authorize access before invoking this helper; no object key is included in its result. |
| `SignedBackupDownload` | type-only interface | `packages/backups/src/download.ts:12` | Descriptor-safe download result returned after server authorization. |
| `StoredBackupRecord` | type-only interface | `packages/backups/src/backup_record.ts:79` | Framework-neutral representation returned by backup services and routes. |
| `UpdateBackupRecord` | type-only type | `packages/backups/src/backup_record.ts:99` | Fields that may change while a backup runs. |

## `adonia-backups/commands/backup_prune`

| Export | Kind | Source | Summary |
| --- | --- | --- | --- |
| `default` | class | `packages/backups/src/commands/backup_prune.ts:11` | Removes completed backups older than the newest configured count. |

## `adonia-backups/commands/backup_run`

| Export | Kind | Source | Summary |
| --- | --- | --- | --- |
| `default` | class | `packages/backups/src/commands/backup_run.ts:11` | Runs the same configured runtime used by HTTP and queue workers. |

Source: https://adonia.pages.dev/reference/api/backups/index.mdx
