You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 2. Install restic (downloads latest to C:\restic\restic.exe)
14
+
restic-sentry.exe install-restic
15
+
16
+
# 3. Generate config file
17
+
restic-sentry.exe init-config
18
+
19
+
# 4. Edit restic-sentry.json with your S3 credentials, backup paths, and Slack webhook
20
+
21
+
# 5. Run a test backup
22
+
restic-sentry.exe backup
23
+
24
+
# 6. Schedule automatic backups (run as Administrator)
25
+
restic-sentry.exe install
26
+
```
27
+
28
+
That's it. Backups will run every 6 hours (configurable), and you'll get Slack notifications on success or failure.
29
+
30
+
## Commands
31
+
32
+
| Command | Description |
33
+
|---------|-------------|
34
+
|`backup`| Run the full backup pipeline (preflight, unlock, init, backup, verify, prune, notify) |
35
+
|`check`| Run a full integrity check — reads and verifies all stored data |
36
+
|`status`| Show repository snapshots, stats, and scheduler status |
37
+
|`install`| Register in Windows Task Scheduler (requires Administrator) |
38
+
|`uninstall`| Remove from Windows Task Scheduler |
39
+
|`install-restic`| Download and install latest restic to `C:\restic\restic.exe`|
40
+
|`update`| Self-update restic-sentry to the latest release |
41
+
|`init-config`| Generate an example config file |
42
+
|`version`| Print version |
43
+
44
+
Commands that interact with the backup repository (`backup`, `check`, `status`, `install`, `uninstall`) require a config file via `--config <path>` (defaults to `restic-sentry.json` next to the binary).
45
+
7
46
## Features
8
47
9
48
### Backup Pipeline
@@ -25,84 +64,63 @@ Every `backup` run executes a full 6-step pipeline:
25
64
-**Process lock file** — prevents overlapping runs when the scheduler fires while a backup is still in progress. The lock is PID-aware: if the holding process is dead, the lock is automatically cleared. A 6-hour max age acts as a safety net so backups never get permanently stuck
26
65
-**Stale restic lock cleanup** — runs `restic unlock` before every backup to clear repository locks left by crashed/killed restic processes
27
66
28
-
### Notifications
67
+
### Slack Notifications
29
68
30
-
Slack webhook notifications with color-coded severity:
69
+
Color-coded by severity:
31
70
32
71
-**Green** — backup successful, shows duration, files processed, data added
33
72
-**Orange** — backup completed with warnings (some files were skipped due to permissions/locks)
34
73
-**Red** — backup failed, preflight failed, or integrity check failed
35
74
36
-
### Observability
75
+
### Copy-Pasteable Commands
37
76
38
-
Every restic command is logged to stderr with the full copy-pasteable command, including env vars (credentials masked with `***`):
77
+
Every restic command is logged to stderr with the full command including env vars (credentials masked with `***`):
You can grab any logged command, fill in your real credentials, and run it manually.
45
-
46
-
### Scheduling
47
-
48
-
Self-registers in Windows Task Scheduler via `schtasks.exe`. Runs with `HIGHEST` privileges (required for VSS). Configurable interval (default: every 6 hours).
49
-
50
-
## Commands
51
-
52
-
| Command | Description |
53
-
|---------|-------------|
54
-
|`backup`| Run the full 6-step backup pipeline |
55
-
|`check`| Run a full integrity check (`--read-data-subset=100%`) |
56
-
|`status`| Show repository snapshots, stats, and scheduler status |
57
-
|`install`| Register in Windows Task Scheduler |
58
-
|`uninstall`| Remove from Windows Task Scheduler |
59
-
|`init-config`| Generate an example config file |
60
-
|`version`| Print version |
61
-
62
-
All commands except `init-config` and `version` accept `--config <path>` (defaults to `restic-sentry.json` next to the binary).
63
-
64
-
## Quick Start
83
+
Grab any logged command, fill in your real credentials, and run it manually for debugging.
65
84
66
-
### 1. Build
85
+
### Self-Update
67
86
68
-
```bash
69
-
# From source (cross-compile for Windows from any OS)
70
-
make build-windows # produces restic-sentry.exe
71
-
72
-
# Or just for your current platform
73
-
make build
87
+
```powershell
88
+
restic-sentry.exe update
74
89
```
75
90
76
-
### 2. Configure
91
+
Checks the latest release on GitHub, downloads the new binary, and replaces itself. The old binary is kept as `restic-sentry.exe.old` as a safety net. If the update fails mid-write, it rolls back automatically.
77
92
78
-
```powershell
79
-
# Generate example config
80
-
restic-sentry.exe init-config
93
+
### Restic Installer
81
94
82
-
# Edit restic-sentry.json with your values
95
+
```powershell
96
+
restic-sentry.exe install-restic
83
97
```
84
98
85
-
### 3. Test
99
+
Downloads the latest restic release from GitHub, extracts `restic.exe` to `C:\restic\restic.exe`. The default config already points to this path, so no extra configuration needed.
100
+
101
+
### Scheduling
86
102
87
103
```powershell
88
-
# Run a backup manually to make sure everything works
Registers itself in Windows Task Scheduler via `schtasks.exe`. Runs with `HIGHEST` privileges (required for VSS). Default interval is every 6 hours, configurable via `schedule_interval_hours` in the config.
93
109
94
110
```powershell
95
-
# Run as Administrator — registers in Task Scheduler
0 commit comments