{"id":16620871,"url":"https://github.com/barthofu/saveqlite","last_synced_at":"2025-10-29T21:31:28.894Z","repository":{"id":40266494,"uuid":"506289869","full_name":"barthofu/saveqlite","owner":"barthofu","description":"♻ Incremental backup system for SQLite databases written in TypeScript","archived":false,"fork":false,"pushed_at":"2022-07-08T10:09:39.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T13:18:30.002Z","etag":null,"topics":["database","dependency-free","incremental-backups","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/saveqlite","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barthofu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-22T14:48:57.000Z","updated_at":"2024-09-22T13:03:13.000Z","dependencies_parsed_at":"2022-06-27T09:24:53.324Z","dependency_job_id":null,"html_url":"https://github.com/barthofu/saveqlite","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barthofu%2Fsaveqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barthofu%2Fsaveqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barthofu%2Fsaveqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barthofu%2Fsaveqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barthofu","download_url":"https://codeload.github.com/barthofu/saveqlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238899984,"owners_count":19549420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","dependency-free","incremental-backups","sqlite","sqlite3"],"created_at":"2024-10-12T02:45:33.970Z","updated_at":"2025-10-29T21:31:28.619Z","avatar_url":"https://github.com/barthofu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SaveQLite\n\n#### Incremental backup system for SQLite databases written in TypeScript!\n\n## Description\n\nBacking up a SQLite database file on a regular basis can quickly become really heavy! Indeed, the total weight of your backup will be `(database_size * num_backups)`.\n\nWith an incremental backup system, only the difference since the last snapshot is saved!\n\nSo we end up with a lightweight save, including multiple snapshots to rollback to any state of the database.\n\n### Credits\n\nThis library is a cleaned up and TypeScript adapted version of [sqlite3-incremental-backup](https://github.com/nokibsarkar/sqlite3-incremental-backup) by [nokibsarkar](https://github.com/nokibsarkar), which was itself built after this [StackOverflow discussion](https://stackoverflow.com/questions/29154646/how-can-i-incremental-backup-a-sqlite-database/60559099).\n\n## Getting Started\n\n### Requirements\n\n- [Node.js](https://nodejs.org/en/) `\u003e= 14.x.x`\n- [npm](https://npmjs.com/) `\u003e= 8.x.x`\n\n### Installing\n\n```bash\nnpm install saveqlite\n```\nor\n```bash\nyarn add saveqlite\n```\n\n## Usage\n\n1. Backup a .sqlite file\n\n```ts\nimport { backup } from 'saveqlite'\n\nbackup(\n    './db.sqlite',\n    'snapshot1.txt'\n)\n```\n\n2. Restore a backup\n\n```ts\nimport { restore } from 'saveqlite'\n\nrestore(\n    './backup.sqlite',\n    'snapshot1.txt'\n)\n```\n\n## Contributing\n\nPull requests are welcome. \n\n### Building for production\n\nTo run the production build use the npm build script:\n\n```javascript\nnpm run build\n```\n\n## License\nISC License\n\nCopyright (c) barthofu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarthofu%2Fsaveqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarthofu%2Fsaveqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarthofu%2Fsaveqlite/lists"}