{"id":46309,"library":"saveqlite","title":"saveqlite","description":"saveqlite is a TypeScript library for incremental backup of SQLite databases. Version 1.1.2 provides functions to create incremental backups and restore them, reducing storage overhead by only saving changes since the last snapshot. It is based on sqlite3-incremental-backup and requires Node.js >=14 and npm >=8. Released as an npm package, it is actively maintained.","status":"active","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/barthofu/saveqlite","tags":["javascript","typescript","sqlite","sqlite3","backup","incremental"],"install":[{"cmd":"npm install saveqlite","lang":"bash","label":"npm"},{"cmd":"yarn add saveqlite","lang":"bash","label":"yarn"},{"cmd":"pnpm add saveqlite","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"saveqlite is ESM-only; CommonJS require may fail if the package is not transpiled.","wrong":"const { backup } = require('saveqlite')","symbol":"backup","correct":"import { backup } from 'saveqlite'"},{"note":"restore is a named export, not default.","wrong":"import restore from 'saveqlite'","symbol":"restore","correct":"import { restore } from 'saveqlite'"},{"note":"Wildcard import works but may import unintended internals.","wrong":"import * as saveqlite from 'saveqlite'","symbol":"backup and restore together","correct":"import { backup, restore } from 'saveqlite'"}],"quickstart":{"code":"import { backup, restore } from 'saveqlite'\n\n// Incremental backup of 'db.sqlite' to snapshot file\nbackup(\n  './db.sqlite',\n  'snapshot1.txt'\n)\n\n// Restore from snapshot to a new or existing database file\nrestore(\n  './backup.sqlite',\n  'snapshot1.txt'\n)","lang":"typescript","description":"Demonstrates incremental backup and restore using the two main functions from saveqlite."},"warnings":[{"fix":"Consider wrapping calls in a Worker thread or using asynchronous alternatives for large databases.","message":"saveqlite uses synchronous file I/O, blocking the event loop during backup/restore.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Do not edit or attempt to parse snapshot files manually.","message":"The backup snapshot file is not human-readable; treat it as opaque binary data.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure the target path is either empty or you intend to overwrite.","message":"Restoring from a snapshot overwrites the target database file if it exists.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Manually compress snapshot files after creation, e.g., using gzip.","message":"The library does not automatically compress snapshots; file sizes may be large for frequently updated databases.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.2':14 '14':46 '8':49 'activ':57 'backup':9,20,42,63 'base':37 'chang':30 'creat':18 'databas':12 'function':16 'increment':8,19,41,64 'javascript':59 'last':33 'librari':6 'maintain':58 'node.js':45 'npm':48,53 'overhead':26 'packag':54 'provid':15 'reduc':24 'releas':50 'requir':44 'restor':22 'save':29 'saveqlit':1,2 'sinc':31 'snapshot':34 'sqlite':11,61 'sqlite3':40,62 'sqlite3-incremental-backup':39 'storag':25 'typescript':5,60 'version':13","created_at":"2026-06-07T12:59:18.443954+00:00","updated_at":"2026-06-07T12:59:18.443954+00:00","problems":[{"fix":"Verify the file path and ensure the database file exists before calling backup.","cause":"The source database file does not exist at the given path.","error":"Error: ENOENT: no such file or directory, open './db.sqlite'"},{"fix":"Install better-sqlite3 version ^7.0.0 and ensure it matches the expected API.","cause":"Incompatible version of better-sqlite3 or missing peer dependency.","error":"TypeError: (intermediate value).isMutex is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/barthofu/saveqlite#readme","github":"https://github.com/barthofu/saveqlite","docs":null,"changelog":null,"pypi":null,"npm":"saveqlite","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}