database_dump
Dump a database to a SQL file on the FastPanel host via SSH using mysqldump. Returns path and byte size for download.
Instructions
Dump a database to a .sql file ON the FastPanel host via SSH (mysqldump). Writes a file you can then download (scp/sftp); returns the path and byte size. The file can only be written inside the staging dir (default /root/fastpanel-mcp-dumps, override with FASTPANEL_DUMP_DIR) — arbitrary output paths are rejected. Targets the host's LOCAL MySQL via root socket auth; remote servers and non-MySQL engines are rejected. WRITE (it creates a root-owned file) — set dry_run:true to preview, confirm:true to execute. Requires SSH configured (FASTPANEL_SSH_HOST).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| dry_run | No | ||
| database_id | Yes | Database id from databases_list | |
| output_path | No | Absolute .sql path INSIDE the staging dir. Default: <staging>/<name>-<timestamp>.sql |