Basic Usage
Day-to-day workflows in Restic Tray: tray operation, folder management, Unity-aware excludes, scheduling, restore checks, history, and config.json.
Overview Screen & System Tray
The 概要 (Overview) page shows your protection status, time since the last successful backup, next scheduled run, active target count, destination bucket, bundled restic version, and a 7-day hourly coverage grid.
概要) screen displaying recent runs and 7-day hourly dots.- Close to tray: Clicking the window close (
×) or minimize button hides Restic Tray to the Windows system tray and stops UI rendering so idle CPU stays near zero. - Tray right-click menu: Open the window, run an immediate backup, or quit the application cleanly. Launching a second instance automatically brings the existing window to the foreground.
- Dark / Light themes: Switch between ink-dark and paper-light themes from the bottom-left sidebar icon or
config.json("theme": "dark" | "light").
Managing Backup Folders
Open フォルダ (Folders) to add directories with フォルダを追加 or by dragging and dropping folders directly onto the window. Each target creates its own independent snapshot per backup run (1 target = 1 snapshot), making browsing, retention, and selective restore straightforward.
Target paths are canonicalized via dunce::canonicalize. You can toggle individual targets on/off, attach custom tags (note: project:, handoff:, and excludes: are reserved prefixes), and set per-target exclude patterns.
Built-in Excludes & Unity Awareness
By default, 基本の除外パターンを有効にする (useBasicExcludes: true) keeps regenerable caches and temporary files out of your R2 bucket while preserving real work (including .git folders):
- General build & cache patterns (matched at any depth):
target/,node_modules/,.venv/,.pytest_cache/,__pycache__/,.git/objects/pack/tmp_pack_*,*.tmp,*.part,.next/,shadercompiler-*.log,AssetImportWorker*.log. - Unity project-root generated folders (detected automatically under any folder containing
ProjectSettings\ProjectVersion.txt, up to 3 levels below a target):Library,Temp,Logs,obj,Build,Builds, andAssets\SerializedUdonPrograms. Same-named folders deeper insideAssets/orPackages/are not excluded. - Marker-based folder excludes (
excludeIfPresent): Any folder containingSourceAssetDB,UnityLockfile,CACHEDIR.TAG(with standard cache header), orpyvenv.cfgis skipped automatically, and you can add custom markers inconfig.json.
As a safety guard, Restic Tray refuses to run a backup if any exclude pattern matches the target folder path itself (which would silently back up zero files). Turn off useBasicExcludes on the フォルダ screen if you intentionally want generated artifacts included.
Schedules, Restore Checks & Overdue Alerts
Configure automated runs under 設定 → スケジュール or in config.json:
- Interval or Daily Times: Run every
intervalMinutes(default:60minutes) or specify fixed local 24-hour times viadailyAt(e.g.["05:00", "17:00"]; when set,intervalMinutesis ignored). Scheduled starts apply a small 0–60 second jitter. - Periodic restore verification: Runs
restic check --read-data-subseteveryverifyEveryDaysdays (default:7,0disables) reading backverifyReadPercent% of stored data (default:5%). Failures trigger a Windows toast notification. - Overdue notifications: Raises a Windows toast notification if no backup succeeds within
notifyOverdueHourshours (default:48,0disables). - Retention policy (
retention): Defaults tokeepLast: 10,keepDaily: 7,keepWeekly: 4,keepMonthly: 6. Automatic post-backup pruning (autoPruneAfterBackup) is disabled by default; when enabled (or scheduled viamaintenanceAton amaintenanceRole: "primary"PC), Restic Tray runsforget --prunesafely.
| Setting | Config Key | Default Value |
|---|---|---|
| R2 region / connections | r2.region / r2.maxConnections |
"auto" / 10 |
| Backup interval / daily times | schedule.intervalMinutes / schedule.dailyAt |
60 min / [] (0–60 s startup jitter) |
| Periodic restore check | schedule.verifyEveryDays / verifyReadPercent |
Every 7 days / 5% read-back (0 disables) |
| Overdue toast alert | schedule.notifyOverdueHours |
48 hours (0 disables) |
| Auto-prune after backup | schedule.autoPruneAfterBackup |
false (opt-in) |
| Retention counts | retention.keepLast / Daily / Weekly / Monthly |
10 / 7 / 4 / 6 |
| Built-in excludes | useBasicExcludes |
true (caches, Unity project-root outputs, marker files) |
History, Size Breakdown & Audit Log
The 履歴 (History) screen reads local SQLite (WAL) logs stored in r2_restic_history.db:
- Backup runs tab (バックアップ): Shows timestamp, trigger source (Scheduled, Manual, MCP), target, new/changed file counts, delta vs. the previous production run (including exclude-change flags), stored bytes, and duration. Lock-deferred runs appear with status
deferredand automatically retry after 15 minutes (up to 2 retries). - Audit log tab (操作ログ): Records every settings update, backup, restore, prune, and MCP invocation.
- Size breakdown: Inspect which subfolders contribute the most stored bytes in a snapshot from the app or via MCP
get_size_breakdown.
Declarative config.json & Data Directory
All per-user runtime files live under %LOCALAPPDATA%\io.github.nayuengin.restic-tray\. You can edit config.json directly (click config.json を開く in Settings) and reload, or manage everything through the GUI and MCP.
| File | Purpose |
|---|---|
config.json |
Non-secret declarative settings: R2 target (r2), folders (targets), excludes, schedule, retention, agent policies, and theme. |
config\credentials.dat |
Windows DPAPI-encrypted R2 Access Key ID, Secret Access Key, and Restic repository password. |
r2_restic_history.db |
SQLite (WAL) database storing backup run history, GUI/tray/MCP audit logs, and multi-PC sync state. |
agent-bridge.json |
Ephemeral local Named Pipe address and 256-bit mutual authentication token written while the tray app is running. |
Safe R2 Cleanup & Multi-PC Handoff
- R2 prefix / bucket deletion: Under 設定 → 保存先 → バケット・データの削除(危険な操作), the built-in pure-Rust S3 client supports deleting objects under your configured prefix (
prefixOnly) or emptying and deleting the entire bucket (entireBucket). The GUI enforces a Dry-Run count preview, exact bucket-name confirmation, and a 1.5-second press-and-hold confirmation button. - Multi-PC shared project handoff (experimental): For non-Git folders shared across two or more Windows PCs (such as Unity projects or creative workspaces), you can assign a stable
projectKeyand use single-writer handoff (引き渡す / この PC に取得して引き継ぐ) with automatic subpath rewriting and pre-takeover safety backups. Only one PC should usemaintenanceRole: "primary". Folders containing.gitare rejected for handoff — use Git for syncing Git repositories.