Restore

O Operator
Restore

Restore file to captured state

Every captured change carries its SHA-256-addressed content in BLOB_STORE. Restoring writes that content back to the original path — current file gets backed up to <path>.drift_restore_backup_<epoch> before overwrite.

What will change
Preview -- nothing has been written yet.
Target file/var/www/vhosts/3dshawn.com/site1/TEMPLATES/settings.html
SiteDriftSense self-monitor on local
Kindlocal
Captured at2026-07-12 00:02:15
Captured SHA907d3c47340c8698c919e83e11f7bd6725a93a1131b3043c2491b7a1acb91a97
Current state on disk
Live check just now. If SHAs match, the restore is a no-op.
File presentyes
Size7111 bytes
Current SHAcec92d338ed6
Same as captured?no -- restore will change it
What restore will change — live diff
Left column shows current on-disk content; right shows what restore will write. +0 additions, -33 deletions, 76 unchanged context lines.
11<div class="page-head">
22 <span class="page-eyebrow"><span class="dot"></span> Configure</span>
33 <h1 class="page-title">Settings</h1>
44 <p class="page-subtitle">Installation-level configuration. Read from <code>/etc/drift_sense/drift_sense.conf</code> -- edit that file to change values, then restart the daemons.</p>
5</div>
6
7<div class="ds-guide">
8 <div class="dsg-icon">i</div>
9 <div>
10 <span class="dsg-title">What's live-editable vs static:</span>
11 The <strong>global scan settings</strong> below (ignore list, file-type filter, max size) are DB-backed and take effect on the very next scanner tick &mdash; no daemon restart needed. Global ignore patterns are <strong>UNION'd</strong> <span class="ds-help" data-help-title="UNION vs override" data-help-body="For ignore patterns: both global and per-monitor lists apply, so if global says <code>*.log</code> and a monitor says <code>tmp/</code>, both are excluded. For file-type filter: per-monitor wins if set (empty = fall back to global). For max file size: per-monitor wins if set."></span> with each monitor's own list. Anything under <em>Resolved configuration</em> requires editing the conf file.
12 </div>
135</div>
146
157<div class="dash-grid" style="grid-template-columns:repeat(3,1fr);margin-bottom:16px">
168 <div class="module glow-teal">
179 <div class="module-head"><div class="left"><div class="module-title">BLOB_STORE size</div><span class="module-subtitle">Unique content states.</span></div></div>
1810 <div class="module-body kpi kpi-teal"><div class="num">$blob_ct</div><div class="lbl">unique blobs</div></div>
1911 </div>
2012 <div class="module glow-emerald">
2113 <div class="module-head"><div class="left"><div class="module-title">Compression ratio</div><span class="module-subtitle">Uncompressed vs on-disk.</span></div></div>
2214 <div class="module-body kpi kpi-emerald"><div class="num">$ratio</div><div class="lbl">savings</div></div>
2315 </div>
2416 <div class="module glow-sky">
2517 <div class="module-head"><div class="left"><div class="module-title">Dedup references</div><span class="module-subtitle">How many FILE_CHANGES rows point at BLOB_STORE.</span></div></div>
2618 <div class="module-body kpi kpi-sky"><div class="num">$total_refs</div><div class="lbl">references</div></div>
27 </div>
28</div>
29
30<div class="dash-grid" style="grid-template-columns:1fr 1fr;margin-bottom:16px">
31 <div class="module glow-sky">
32 <div class="module-head"><div class="left">
33 <div class="module-title">Auto-purge plan (30d)</div>
34 <span class="module-subtitle">Dry-run runs daily at 03:15 &mdash; <a href="/purge_log.cgi" style="color:var(--accent-hi)">full log</a></span>
35 </div></div>
36 <div class="module-body kpi kpi-sky">
37 <div class="num">$purge_dry_ct</div>
38 <div class="lbl">blobs would be freed</div>
39 <div class="sub"><strong>$purge_dry_bytes</strong> reclaimable &middot; last run <span class="ts" data-ts="$last_purge_epoch" data-fmt="relative">$last_purge_h</span></div>
40 </div>
41 </div>
42 <div class="module glow-amber">
43 <div class="module-head"><div class="left">
44 <div class="module-title">Live purges (30d)</div>
45 <span class="module-subtitle">Actual disk reclaimed once live mode is on.</span>
46 </div></div>
47 <div class="module-body kpi kpi-amber">
48 <div class="num">$purge_live_ct</div>
49 <div class="lbl">blobs deleted</div>
50 <div class="sub"><strong>$purge_live_bytes</strong> reclaimed</div>
51 </div>
5219 </div>
5320</div>
5421
5522[if:$saved]
5623<div class="banner banner-ok" style="margin:0 0 16px;padding:10px 14px;border-radius:10px;background:rgba(52,211,153,.10);border:1px solid rgba(52,211,153,.35);color:#a7f3d0;font-size:13px">
5724 Global scan settings saved. Applies to the very next scanner tick.
5825</div>
5926[/if]
6027
6128<div class="module glow-amber" style="margin-bottom:16px">
6229 <div class="module-head"><div class="left">
6330 <div class="module-icon"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg></div>
6431 <div class="module-title">Global scan settings</div>
6532 <span class="module-subtitle">Applied to every monitor -- portfolio-wide. Ignore patterns are UNION'd with each monitor's own list. File-type filter is used only when a monitor's own filter is empty.</span>
6633 </div></div>
6734 <div class="module-body">
6835 <form method="post" action="/settings.cgi" style="display:flex;flex-direction:column;gap:14px">
6936 <input type="hidden" name="save_globals" value="1">
7037
7138 <label style="display:flex;flex-direction:column;gap:4px">
7239 <span class="rb-label">Global ignore patterns
7340 <span class="dim" style="text-transform:none;letter-spacing:0;font-size:10.5px">&mdash; one per line OR comma-separated. Glob wildcards <code>*</code>, <code>?</code>, and <code>**</code> supported.</span>
7441 </span>
7542 <textarea name="global_ignore_list" rows="10" placeholder="*.swp&#10;*.tmp&#10;*.bak&#10;node_modules/*&#10;.git/*&#10;logs/*"
7643 style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.6;resize:vertical">$global_ignore_pretty</textarea>
7744 </label>
7845
7946 <div style="display:flex;gap:12px">
8047 <label style="flex:2;display:flex;flex-direction:column;gap:4px">
8148 <span class="rb-label">Global file-type filter <span class="dim" style="text-transform:none;letter-spacing:0;font-size:10.5px">(blank = all types)</span></span>
8249 <input type="text" name="global_file_type_filter" value="$global_file_type_filter" placeholder="pl,pm,cgi,html,css,js,sql,conf,md"
8350 style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 12px;font-family:var(--mono);font-size:12px">
8451 </label>
8552 <label style="flex:1;display:flex;flex-direction:column;gap:4px">
8653 <span class="rb-label">Global max file size (bytes)</span>
8754 <input type="number" name="global_max_file_size_bytes" value="$global_max_file_size_bytes" min="0"
8855 style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 12px">
8956 </label>
9057 </div>
9158
9259 <div style="display:flex;justify-content:flex-end">
9360 <button type="submit" class="tr-chip is-active" style="border:none;padding:8px 18px">Save globals</button>
9461 </div>
9562 </form>
9663 </div>
9764</div>
9865
9966<div class="module glow-teal">
10067 <div class="module-head"><div class="left"><div class="module-title">Resolved configuration</div><span class="module-subtitle">Merged from conf file + code defaults. Secrets redacted.</span></div></div>
10168 <div class="module-body tight">
10269 <table class="tbl">
10370 <thead><tr><th style="width:260px">Key</th><th>Value</th></tr></thead>
10471 <tbody>
10572 [loop:@cfg_rows]<tr><td class="mono"><strong>$key</strong></td><td class="mono dim">$value</td></tr>[/loop]
10673 </tbody>
10774 </table>
10875 </div>
10976</div>
Confirm restore
Backs current content to <target>.drift_restore_backup_<epoch>, writes the captured content, verifies SHA post-write.
Cancel Logged to RESTORE_LOG regardless of outcome.