prune-backup-files
Lists backup files in a directory or previews which files a retention rule would remove, returning a prune plan without deleting anything.
Instructions
dbabrain common.cli prune-backup-files: Which backup files a directory holds, or which a retention rule would remove.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
db_type (required): The engine the files belong to.
host: The host holding them.
target: SQL Server: the instance that lists its own backup folder - {host, port, username, password}.
path (required): The directory.
database_name: One database.
kinds: full | diff | log.
latest: Only the newest per database and kind.
after: Newer than this instant.
before: Older than this instant.
mode: prune: how obsolescence is judged.
cleanup_retention: prune: how long files are kept.
delete: prune: true is REFUSED since 0.38.0 - the command answers the plan and deletes nothing.
timeout_seconds: How long to wait.
wal_segments: PostgreSQL (0.35.0, 1.250): answer every segment name under wal/ on the log row - what a restore's WAL continuity is read from. Off by default: a cluster archives thousands.
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": "prune-backup-files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |