Skip to content

Backups: one restic progress line a minute in the log - #41

Draft
davior wants to merge 1 commit into
mainfrom
claude/wonderful-goldberg-ifbtdt
Draft

davior wants to merge 1 commit into
mainfrom
claude/wonderful-goldberg-ifbtdt

Conversation

@davior

@davior davior commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Why

The first backup on the server has been running for over an hour with nothing in the log after no parent snapshot found, will read all files, which looks frozen. It isn't: an hourly tick logged previous run still going, skipping, and that line only appears while the run holds its lock.

restic shows no progress when stdout isn't a terminal (calculateProgressInterval in restic 0.16.4's cmd/restic/progress.go returns 0), and every backup run logs to /proc/1/fd/1. So a run that takes most of a day is silent until it ends.

Changes

  • docker-compose.yml: RESTIC_PROGRESS_FPS=${RESTIC_PROGRESS_FPS:-0.0166} on the backup service, i.e. one status line a minute. When the variable is set, restic prints progress even without a terminal. A normal hourly run finishes well inside a minute and adds about one line.
  • .env.example: the same variable, with a comment.
  • ops/backup/README.md ("A large first upload"):
    • the log shows one line a minute;
    • quiet between lines is normal;
    • the skipping line proves the run is alive;
    • rclone size nas:… and docker stats show progress on demand.

Testing

  • docker compose config shows RESTIC_PROGRESS_FPS: "0.0166" on the backup service.
  • Checked the restic 0.16.4 source: when the variable is set, fps > 0 gives a non-zero interval regardless of whether there's a terminal.
  • The real check is the next run on the server. It takes effect at the next container recreate, which shouldn't be done while the current first run is going.

Generated by Claude Code

restic shows no progress unless stdout is a terminal, and backup runs
log to /proc/1/fd/1, so a day-long first upload was silent from start to
finish and read as frozen. RESTIC_PROGRESS_FPS is restic's documented
switch for that; 0.0166 is one status line a minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWoa1a1upTria7ntq56x3B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants