← Files InsForgeARCHIVED FILE
skills/insforge-cli/references/database/import.md
680 Bytes · Oct 5, 2026 · 18:29 UTC
# npx @insforge/cli db import Import database from a SQL file. ## Syntax ```bash npx @insforge/cli db import <file> [options] ``` ## Options | Option | Description | |--------|-------------| | `--truncate` | Truncate existing tables before import | ## Examples ```bash # Import SQL file npx @insforge/cli db import backup.sql # Import with table truncation npx @insforge/cli db import backup.sql --truncate ``` ## Output Displays filename, number of tables processed, and rows imported. ## Notes - The file must be a valid SQL file (e.g., from `npx @insforge/cli db export`). - Use `--truncate` carefully — it removes all existing data from tables before importing.
SHA-256: e8380dd36da628fe9e2953622331be5082d2fb6de6e6cda6822f884555a4f67c