index_sync
Copies P5 per-client backup indexes into the catalogue database so file-name searches run in seconds instead of scanning the full P5 index; incremental by default, with resumable and full sync options.
Instructions
Copies P5's per-client backup index (read-only, immutable sqlite on the P5 host, P5 is not disturbed) into the catalogue database (tables names, dirs, p5_dirs, p5_files, index_state) so find_file can search names in seconds instead of the ~5 minute scan of P5's own 9.5 GB files.db. Paths are rebuilt set-based (one recursive query), rows stream in batches of 200000. Incremental by default: only new element ids plus versions that ended since the last run; a killed run resumes. full:true rescans everything. detach:true runs it on the host (use for the first, ~84 million row sync); index_status shows progress and rows/s. Writes only to the catalogue database.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "index_sync"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| client | No | P5 client (default: every client with a backup index) | |
| detach | No | ||
| noDtime | No | skip re-reading rows for versions that ended since the last run (faster, deleted-file status lags until the next full pass) |