This is my first post and I apologize if it’s rambling or otherwise wrong.
restic version:
restic 0.19.1 compiled with go1.24.x on linux/amd64
(Originally on 0.16.4; upgraded mid-troubleshooting — see below.)
Environment variables:
RCLONE_CONFIG=/mnt/tank/backups/secrets/rclone.conf
RESTIC_CACHE_DIR=/mnt/tank/backups/cache/restic
Environment:
- TrueNAS SCALE, 8GB RAM (Intel i3-1315U)
- Backend: Backblaze B2 via rclone
- Repository: 132.87 GiB, 8,187 objects, 244 snapshots (spans two hosts sharing one bucket — see note below)
The command that fails:
restic -r rclone:b2backup:andy-restic-backup/20260109-restic \
--password-file /mnt/tank/backups/secrets/restic_pw \
forget \
--host nas-dxp4800pro \
--keep-last 4 --keep-daily 14 --keep-weekly 8 --keep-monthly 12 --keep-yearly 3 \
--prune
What happens:
The kernel OOM-killer fires — not narrowly against restic, but a cascading sweep that killed smbd, dockerd, winbindd, syncthing, even systemd-journal and systemd-logind in one incident, forcing a reboot. Relevant excerpt from journalctl -b -1 -p err:
Jul 05 22:52:19 truenas kernel: Out of memory: Killed process 3034 (cli) total-vm:484616kB, anon-rss:104564kB...
Jul 05 22:52:19 truenas kernel: Out of memory: Killed process 2320721 (syncthing) total-vm:1364756kB...
[... ~30 more processes killed in the same second ...]
Separately, restic check (same repo, no other args besides -r and --password-file) shows the same trajectory — during “check snapshots, trees and blobs,” available memory declines steadily (~30 MiB per snapshot processed in one observed run), clearly heading toward exhaustion before completing all 244. I aborted that run proactively rather than let it crash, so I can’t share a completed failure log for check specifically — only the trend.
Repo detail worth flagging: this repository holds snapshots from two different hosts sharing one B2 bucket — my TrueNAS NAS (nas-dxp4800pro, ~10 snapshots, 4 datasets) and a separate desktop workstation (tuxedo-os, the bulk of the 244 snapshots, backing up /home/andy). I hadn’t fully registered this myself until digging in — relevant to the “why is this repo so expensive for its size” question below.
What I tried on the restic side
- Version upgrade (0.16.4 → 0.19.1, which per the changelog includes ~60% prune memory reduction). Helped somewhat — got further before hitting the wall — but same eventual crash.
- ZFS ARC cap — reduced
arc_maxfrom ~7GiB to 3GiB via a TrueNAS tunable. ARC correctly shrank under pressure as expected, but had no effect on the OOM outcome. Ruled out. - Cache directory — initially suspected
--cache-dir/RESTIC_CACHE_DIRdefaulting to tmpfs (RAM-backed on TrueNAS SCALE) as a contributor, based on manual ad-hoc testing without the env var set. My actual production script already hadRESTIC_CACHE_DIRpointed at a real disk-backed path the whole time (shown above) — so this was a red herring from my own testing methodology, not a factor in the real crashes. - Prune tuning (
--max-repack-size 2G,--max-unused 10%) — added to bound per-run repack work. Worth keeping, but based on what I’ve read since, these mainly affect duration/IO, not the peak memory needed for the underlying index-loading/blob-tracking step.
What actually worked: rustic
Tested rustic 0.11.2 against the identical repository, same hardware, no re-initialization — pointed straight at the existing restic-format repo:
rustic --password-file /mnt/tank/backups/secrets/restic_pw \
--cache-dir /mnt/tank/backups/restic-cache \
-r rclone:b2backup:andy-restic-backup/20260109-restic \
check
Completed successfully across all 244 snapshots. Heaviest phase (“checking trees”) took ~13-14 minutes; available memory oscillated down to ~180-200MB at its worst but consistently recovered.
rustic --password-file ... --cache-dir ... -r ... \
forget --filter-host nas-dxp4800pro \
--keep-last 4 --keep-daily 14 --keep-weekly 8 --keep-monthly 12 --keep-yearly 3 \
--prune
Dry-run and real run both completed successfully (316 packs repacked, 8 deleted, 132.2GB remaining), surviving several transient B2 500 errors via normal retry logic. Post-prune check confirmed repo integrity.
Questions
- Is this OOM ceiling expected/known for restic at this repo size (130GB / 244 snapshots) on 8GB RAM, or does it point to something misconfigured on my end?
- Given the repo spans two hosts sharing dedup space — does splitting by host meaningfully reduce per-run memory, or does cross-host dedup reduce that benefit?
- Anyone running rustic long-term against a repo originally created by restic, keeping restic for routine backups and rustic only for check/prune? Any gotchas given they claim full format compatibility?
- Is there a known memory ceiling for rustic too at larger scale, or does its architecture genuinely sidestep this class of problem?
Happy to provide further logs/output if useful.