Import & Backup
Import joins new documents with existing data. Backup creates a full timestamped copy of the entire database.
Import
// Join / append with existing data (default)
users.import('./users-export.json');
// Replace all existing data
users.import('./users-export.json', { clear: true });
// Async
await users.importAsync('./users-export.json');
Backup
const path = db.backup('./backups');
// creates something like: ./backups/backup-2026-08-20T12-00-00-000Z/
const path2 = await db.backupAsync('./backups');
The backup copies every .json and .idx.json file from the database folder.
Next: Learn about Events.