← Files InsForgeARCHIVED FILE
skills/insforge-cli/references/database/export.md
1.1 KB · Oct 4, 2026 · 12:28 UTC
# npx @insforge/cli db export Export database schema and/or data. ## Syntax ```bash npx @insforge/cli db export [options] ``` ## Options | Option | Description | Default | |--------|-------------|---------| | `--format <format>` | `sql` or `json` | `sql` | | `--tables <tables>` | Comma-separated table list | all tables | | `--no-data` | Export schema only (no row data) | include data | | `--include-functions` | Include stored functions | no | | `--include-sequences` | Include sequences | no | | `--include-views` | Include views | no | | `--row-limit <n>` | Max rows per table | unlimited | | `-o, --output <file>` | Output file path | stdout | ## Examples ```bash # Full export to file npx @insforge/cli db export --output backup.sql # Schema only npx @insforge/cli db export --no-data --output schema.sql # Specific tables with functions npx @insforge/cli db export --tables users,posts --include-functions --output partial.sql # JSON format npx @insforge/cli db export --format json --output backup.json # Limited rows for development npx @insforge/cli db export --row-limit 100 --output dev-data.sql ```
SHA-256: ae1c35c1e1505a56c0cfcda8fbc0e47d934fc0bf53d4f3a8f7b8eb59ba8a25fa