artiframe db:export

The artiframe db:export command reads the connection credentials from your project's .env file and directly exports the database to a .sql file. It operates via pure PHP/PDO natively within the ArtiFrame CLI, eliminating the need for external tools like mysqldump.

Usage

$ artiframe db:export [mode]

Modes

ModeWhat is Exported?
within Exports table structures (CREATE TABLE) and all records (INSERT INTO). Used for taking full backups.
without Exports only the table structures (schema). Contains no data. Ideal for environment setup (empty database schema).

Example: Full Backup (Structure + Data)

$ artiframe db:export within
🔄 Exporting database: my_db (Structure + Data)...
✅ Success! Database exported.
📂 File: /var/www/my-project/export_within_my_db_20260917_152301.sql

Example: Schema Only (Structure)

$ artiframe db:export without
🔄 Exporting database: my_db (Structure Only)...
✅ Success! Database exported.
📂 File: /var/www/my-project/export_without_my_db_20260917_152318.sql

Technical Notes