Repository navigation
Releases
Releases · Kevinjohn/oss-adonisjs-sqlite-backup
0.4.2
node ace db:upgrade --helpnow describes--schema-generateas it behaves: schema classes are
generated withschema:generateafter a successful migration, never in production. The flag
name, default and behaviour are unchanged.- Correction to 0.4.0: its entry described a documentation-only release, but 0.4.0 also shipped
these runtime and public-surface changes.- Behaviour change:
db:backup verifyandrestore-preparefail withE_BACKUP_INVALIDwhen a
bundle'sREADY,manifest.jsonordb.sqliteis not a regular file, for example a symbolic
link;db:backup listdoes the same forREADYandmanifest.json. - Behaviour change:
defineConfigthrowsE_BACKUP_SOURCEfor a malformedconnectionor
requireWalandE_BACKUP_UNSAFEfor a malformeddirectory. The provider runs
defineConfigagain on the host configuration when it builds the service. - New export
@kevinjohn/adonisjs-sqlite-backup/services/main, the booted application's
sqlite.backupsingleton. ./typesre-exportsBackupErrorCode,DirectoryLockandNativeDatabase, and the build
output is unbundled, one module per source file.
- Behaviour change:
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.4.2/kevinjohn-adonisjs-sqlite-backup-0.4.2.tgzSHA-256: 68c9f8a368477d647bf25ccf5ae54859deae71348e07302913836e6590c1e242
0.4.1
- Refuse to prepare a backup directory containing the configured live database before changing
directory permissions. Clarify that the backup service entry point is available since v0.4.0.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.4.1/kevinjohn-adonisjs-sqlite-backup-0.4.1.tgzSHA-256: 57d8b9733960298bbec15a8b7dfae85881826f5145385e050adc8480ef75b6f6
0.4.0
- Document and verify the package user stories and implementation flows.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.4.0/kevinjohn-adonisjs-sqlite-backup-0.4.0.tgzSHA-256: f3a0a55b263aee2e3f48c1cdbd80d6f2e6979c42f714a49d7b17176a716e1caf
0.3.3
db:upgradeexits non-zero when a migration fails on every Lucid 22 release. With Lucid 22.0 or
22.1, schema generation after a failed migration reset the exit code to 0.db:upgradenow runs
migration:run --no-schema-generate, thenschema:generateonly after a successful migration.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.3.3/kevinjohn-adonisjs-sqlite-backup-0.3.3.tgzSHA-256: fb60a9dab074b020c22e5fbbf48e10baf10a4ad3e09833a056ac2e52fee86271
0.3.2
- Check snapshot path safety before preparing the backup directory, and verify the pre-upgrade
snapshot before running migrations. - Refuse configured prune when the archive directory contains the live database. Report same-process
lock contention immediately and preserve observed deletion progress if finalization fails.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.3.2/kevinjohn-adonisjs-sqlite-backup-0.3.2.tgzSHA-256: 854316b1b06e99f177d75e6795659296bf09902fd84d8ac67ebdbfe82c97e517
0.3.1
- A trailing slash on a folder that does not exist yet is accepted again, so
prepareDirectory
creates a backup directory configured as/path/backups/on first use. 0.3.0 refused it with
E_BACKUP_UNSAFEand a message about.after a missing folder. A trailing slash after a
regular file, and.or..after a missing folder, are still refused. A restore target
written with a trailing slash is still refused, now with a message that says so.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.3.1/kevinjohn-adonisjs-sqlite-backup-0.3.1.tgzSHA-256: e0b01e80b256d40590e1f90d0a7233db9eba84c5ef7b6867ff5b35c4807ff4a2
0.3.0
db:upgradesnapshots use the primary connection's migrations table and the backup config's
lockTimeoutMsandrequireWal, and report the non-WAL warning. Before, they always read
adonis_schema, never waited for the lock and ignoredrequireWal.- Operator commands pin the primary SQLite handle and serialize queries through it. Lucid and pool
lifecycle failures remain visible; work and cleanup failures are both preserved. - Filesystem paths are resolved segment by segment, so
..follows symlink targets. Package-owned
sources and restore targets are refused if the native SQLite driver changes the selected filename
spelling; this does not promise support for every kernel filename form. Borrowed handles remain
supported. db:backup createchecks source-layout eligibility before directory preparation. Preparation
makes missing directories and tightens an existing directory to mode0700, and refuses an
existing non-directory root. First-use root and bundle metadata are synced in publication order;
failed publication is unpublished when cleanup succeeds.- Native close and cleanup failures are preserved in diagnostics, including contention and retry
paths. Cleanup is attempted; the package does not guarantee every native close succeeds. - Lock waits are cooperative and asynchronous for create operations. Timeouts are bounded to
integer milliseconds from 0 through 2,147,483,647, and damaged multiply-linked lock files are
refused before repair. - Restore preparation classifies damaged READY bundles and refuses targets whose resolved spelling
aliases the live database or its sidecars. - Retention counts READY markers without verifying bundle contents. Verification connections do not
load application-only SQL functions, collations or extensions; a bundle is refused only when
their absence prevents verification. Idle server processes are not detected: EXCLUSIVE locking
blocks conflicting work but does not prevent another process from opening a handle. No blanket
power-loss guarantee is made. - Deadline checks, child-process fixture readiness and benchmark cleanup now follow their actual
process lifecycles. The release gate builds and packs the candidate, then installs that archive in
a consumer fixture and exercises its exports, types, configure flow, provider and commands.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.3.0/kevinjohn-adonisjs-sqlite-backup-0.3.0.tgzSHA-256: 10bc95506807ea2a13957f0f8e0713bb72d5475feea7f0316aad67b3f3765d5f
0.2.0
db:upgradeace command: a verified snapshot of an existing database, thenmigration:run.
The snapshot goes topre-migrationunder the configured backup directory, or to
<database>.backups;preMigrationBackupDirectoryreturns that path.operatorDatabasePathandwithOperatorDatabasefor stopped-server operator commands, with the
NativeDatabasetype.syncPathis exported.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.2.0/kevinjohn-adonisjs-sqlite-backup-0.2.0.tgzSHA-256: 03f6faa009b2a1170bf0a998f1ea7c087fb2dd351861690c7a6edeea963e80b8
0.1.0
First release.
db:backup create|list|verify|restore-prepare|pruneace command, asqlite.backupservice and
node ace configure(writesconfig/backup.ts, registers the provider and command).- Immutable bundles: online copy, full
integrity_checkandforeign_key_check, SHA-256 manifest,
READYwritten last. Optional migration-journal metadata, checked on verify and restore. - Backups through an already-open better-sqlite3 handle, which is never closed by the package.
- Prepare-only restore: stages and verifies a copy, never replaces the live database.
- Prune keeps the newest N READY bundles and removes unfinished ones, under a SQLite directory lock.
- Private backup roots (
0700), a disabled configuration,--directoryrecovery overrides and a
BackupExceptionwith six codes.
Install
pnpm add https://github.com/Kevinjohn/oss-adonisjs-sqlite-backup/releases/download/v0.1.0/kevinjohn-adonisjs-sqlite-backup-0.1.0.tgzSHA-256: d32cd2ae9345b594bab09ff19c3edb5a67a50777c3652d83fb88128a3ae6e8ce