manage_backups
List, restore, purge, or snapshot automatic Excel workbook backups from rotating prev and anchor slots, with dry-run purge and permanent dated snapshots.
Instructions
Manage the automatic backups in the hidden .ks4xl-backups folder next to each mutated workbook: two rotating slots per file, prev (state before the most recent mutation) and anchor (session start). action='list': slot files with sizes and mtimes plus orphaned slot folders; give path for one workbook or directory for a folder. action='restore': overwrite path with source 'prev' or 'anchor'; the current content rotates into prev FIRST so a restore is itself undoable, the payload is validated as a real workbook before the atomic replace, and files open in Excel refuse. action='purge': delete backups; scope is 'orphans' (slot folders whose workbook is gone) or 'slots' (one workbook's pair); dry_run defaults to TRUE and only reports. action='snapshot': save a permanent DTG-stamped copy, YYYYMMDD_HHMM_, optional label and dest_dir; snapshots are never rotated and no purge scope touches them. LIMIT, stated loudly: prev holds the state before the LAST mutation this server made, so damage that lands AFTER the last save (crash, disk, another program) costs that final edit; only a snapshot habit covers it. Lost or corrupt file? get_workflows task='recover-workbook' is the walkthrough.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| label | No | ||
| scope | No | ||
| action | Yes | ||
| source | No | ||
| dry_run | No | ||
| dest_dir | No | ||
| directory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||