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/schema_changes.html
SiteDriftSense self-monitor on local
Kindlocal
Captured at2026-07-10 22:19:13
Captured SHAa557ada4dbf65844457dc8cb6e2960bdf3b4a57036420f69c8986c0e0ad566c0
Current state on disk
Live check just now. If SHAs match, the restore is a no-op.
File presentyes
Size2912 bytes
Current SHAe44d80f7076d
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. +15 additions, -10 deletions, 41 unchanged context lines.
11<div class="page-head">
22 <span class="page-eyebrow"><span class="dot"></span> Monitor</span>
33 <h1 class="page-title">Schema changes</h1>
44 <p class="page-subtitle">Every DDL change captured across every monitored database. Someone ALTERs a column? It shows up here whether they told you or not.</p>
55</div>
6
7$picker_html
86
9<form method="get" action="/schema_changes.cgi" style="display:flex;gap:8px;align-items:center;margin-bottom:16px">
10 <span class="rb-label" style="font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--text-muted);font-weight:700">Table filter</span>
11 <input type="text" name="q" value="$q" placeholder="db or table name substring" style="flex:1;background:var(--bg-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 12px;font-size:12.5px;font-family:inherit">
12 <button type="submit" class="tr-chip is-active" style="border:none">Apply</button>
13 [if:$q]<a class="tr-chip" href="/schema_changes.cgi">Clear</a>[/if]
7<form method="get" action="/schema_changes.cgi" style="display:flex;gap:10px;align-items:center;padding:12px 14px;background:var(--bg-2);border:1px solid var(--border);border-radius:12px;margin-bottom:16px">
8 <span class="dim mono" style="font-size:11px;letter-spacing:1.4px;text-transform:uppercase">Range</span>
9 <select name="days" onchange="this.form.submit()">
10 <option value="1">Last 24h</option>
11 <option value="7">Last 7 days</option>
12 <option value="30" selected>Last 30 days</option>
13 <option value="90">Last 90 days</option>
14 <option value="365">Last year</option>
15 </select>
16 <input type="text" name="q" value="$q" placeholder="db or table name filter" style="flex:1">
17 <button type="submit" class="btn">Filter</button>
18 <span style="margin-left:auto" class="dim">$total results</span>
1419</form>
1520
1621<div class="module glow-amber">
1722 <div class="module-head"><div class="left">
1823 <div class="module-icon"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v6c0 1.7 4 3 9 3s9-1.3 9-3V5"/></svg></div>
1924 <div class="module-title">DDL diffs</div>
20 <span class="module-subtitle">Each row shows what the schema looked like before and after. Click to see the full unified diff of column adds, drops, and alters. $total match this window.</span>
25 <span class="module-subtitle">Each row shows what the schema looked like before and after. Click to see the full unified diff of column adds, drops, and alters.</span>
2126 </div></div>
2227 <div class="module-body tight">
2328 [if:$has_rows]
2429 <table class="tbl">
2530 <thead><tr>
2631 <th style="width:220px">Database.Table</th>
2732 <th>Change</th>
2833 <th style="width:110px">30-day rhythm</th>
2934 <th style="width:110px">Server</th>
3035 <th style="width:180px">When</th>
3136 </tr></thead>
3237 <tbody>
3338 [loop:@rows]
3439 <tr>
3540 <td class="mono"><a href="$diff_url" style="color:var(--accent-hi);text-decoration:none"><strong>$database_name</strong>.<span class="dim">$table_name</span></a></td>
3641 <td class="mono dim" style="font-size:12px"><a href="$diff_url" style="color:inherit;text-decoration:none">$changes_preview</a></td>
3742 <td>$sparkline_svg</td>
3843 <td class="dim">$server_name</td>
39 <td class="mono dim"><span class="ts" data-ts="$ts_epoch" data-fmt="datetime">$change_datetime</span></td>
44 <td class="mono dim">$change_datetime</td>
4045 </tr>
4146 [/loop]
4247 </tbody>
4348 </table>
4449 [/if]
4550 [if:!$has_rows]
4651 <div style="padding:36px 14px;text-align:center;color:var(--text-dim);font-size:13.5px">
47 No schema changes captured in this window. Try widening the range with the chips above, or configure a database monitor in <a href="[url:databases]" style="color:var(--accent-hi)">Databases</a>.
52 No schema changes captured. Configure a database monitor in <a href="[url:databases]" style="color:var(--accent-hi)">Databases</a>.
4853 </div>
4954 [/if]
5055 </div>
5156</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.