Manual forget via API fails instantly: "command.run carried no forget_groups (server didn't populate them)" #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Triggering a forget job through the HTTP API fails immediately, before restic is invoked. The scheduled forget path works (the agent logs
accepting forget job ... groups:1), so this is specific to the manual/run-now dispatch path: the server does not populateforget_groupson thecommand.runmessage.This makes
--dry-runforget unusable, which is exactly the tool you want when diagnosing a retention problem non-destructively.Reproduce
Observed
Job transitions to
failedwith identical start/finish timestamps and zero log lines:Agent-side (host-A, agent v1.1.0):
Expected
The manual dispatch path should populate
forget_groupsfrom the host's source-group retention policy, the same way the scheduler does — so a run-now forget (with or without--dry-run) behaves identically to the scheduled one.Evidence this is manual-path-only
On the same host, over 30 days of agent logs:
forget_groupserror: 1 occurrence (the manual call above)"msg":"agent: accepting forget job","groups":1daily, e.g.01M0KT1YZX54NRB9FDM7XPT0Z1at 04:00:56 on 2026-08-22Impact
Medium. Scheduled retention is unaffected, but there is no non-destructive way to inspect what a forget would do. Diagnosing a retention issue currently requires running a live, irreversible forget.
Environment
v1.1.0(commit0f5110f3d9b91b269684453e6b8d14dbcffb93c6, built 2026-06-16T06:32:52Z)0.18.1, protocol_version 1host-A(Ubuntu 24.04)