create_backup
Create a verified SQLite backup of a GnuCash book, even during active use, with an optional label. Restore instructions are provided in the response.
Instructions
Create an on-demand backup of the GnuCash book.
Uses SQLite's online backup API so the snapshot is safe even
if the book is being read or written concurrently by GnuCash
desktop. Verifies the copy with PRAGMA integrity_check
before declaring success; a failed check deletes the bad
backup and raises.
Manual backups are kept indefinitely — automatic retention (session / weekly / monthly stages) does not touch them. To review or remove backups, the user works with the files directly in the backup directory; no tool can list or delete them.
The response includes a restore_hint describing the
filesystem command to restore from this backup. Restore is a
human-run filesystem operation, not an MCP tool — see
docs/RESTORE_FROM_BACKUP.md for details.
Args:
label: Optional free-text label (sanitized to
[A-Za-z0-9_-]) appended to the filename for human
context, e.g. "pre-recategorization" or
"pre-tax-filing".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |