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/page_wrapper.html
SiteDriftSense self-monitor on local
Kindlocal
Captured at2026-07-12 00:48:48
Captured SHAd521961d3da4bf8a463860693ec75d96e7f12d384eda6b8ae5b3892bd9a97ceb
Current state on disk
Live check just now. If SHAs match, the restore is a no-op.
File presentyes
Size6871 bytes
Current SHA5b6934827553
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. +11 additions, -4 deletions, 110 unchanged context lines.
11<!doctype html>
22<html lang="en">
33<head>
44 <meta charset="utf-8">
55 <meta name="viewport" content="width=device-width, initial-scale=1">
66 <title>$page_title -- $brand_name</title>
77 <link rel="stylesheet" href="/assets/styles/drift_sense.css?v=$asset_version">
88 <link rel="stylesheet" href="/assets/styles/help_tips.css?v=$asset_version">
99</head>
1010<body>
1111<div class="app">
1212
1313 <aside class="sidebar">
1414 <a class="sidebar-brand" href="[url:dashboard]">
1515 <div class="logo">DS</div>
1616 <div>
1717 <div class="name">Drift<span class="accent">Sense</span></div>
1818 <div class="role">$brand_tagline</div>
1919 </div>
2020 </a>
2121
2222 <div class="sidebar-section-label">Monitor</div>
2323 <a href="[url:dashboard]" class="sidebar-link[if:$active_dashboard] active[/if]">
2424 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg>
2525 <span>Dashboard</span>
2626 </a>
2727 <a href="[url:file_changes]" class="sidebar-link[if:$active_file_changes] active[/if]">
2828 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
2929 <span>File changes</span>
3030 </a>
3131 <a href="[url:schema_changes]" class="sidebar-link[if:$active_schema_changes] active[/if]">
3232 <svg viewBox="0 0 24 24" 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"/><path d="M3 11v6c0 1.7 4 3 9 3s9-1.3 9-3v-6"/></svg>
3333 <span>Schema changes</span>
3434 </a>
3535 <a href="[url:table_locks]" class="sidebar-link[if:$active_table_locks] active[/if]">
3636 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
3737 <span>Table locks</span>
3838 </a>
3939 <a href="[url:named_releases]" class="sidebar-link[if:$active_named_releases] active[/if]">
4040 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 13V7a2 2 0 0 0-2-2h-4l-2-3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5"/><path d="M14 19l2 2 4-4"/></svg>
4141 <span>Named releases</span>
42 </a>
43 <a href="/sites.cgi" class="sidebar-link[if:$active_sites] active[/if]">
44 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
45 <span>Sites ($sites_ct)</span>
4642 </a>
4743
4844 [if:$has_stables]
4945 <div class="sidebar-section-label">Stable versions</div>
5046 [loop:@stable_releases]
5147 <a href="$restore_url" class="sidebar-link ds-stable-link" title="Restore all pinned to this stable version">
5248 <span class="ds-stable-tag">v</span>
5349 <span>$label</span>
50 </a>
51 [/loop]
52 [/if]
53
54 [if:$has_sites]
55 <div class="sidebar-section-label">Sites monitored ($has_sites)<span class="ds-help" data-help-title="Sites monitored" data-help-body="Every active File Monitor becomes a link here. Click one to see a focused view of that site's captures, releases, and quick actions. Dot color: <strong>green</strong> = 5+ changes in the last 24h, <strong>amber</strong> = 1-4, <strong>gray</strong> = quiet."></span></div>
56 [loop:@sites]
57 <a href="$site_url" class="sidebar-link ds-site-link[if:$is_active] active[/if]">
58 <span class="ds-site-badge">$initials</span>
59 <span class="ds-site-label">$label</span>
60 <span class="ds-site-dot ds-dot-$activity_dot" title="$changes_24h changes in last 24h"></span>
5461 </a>
5562 [/loop]
5663 [/if]
5764
5865 <div class="sidebar-section-label">Notify &amp; export</div>
5966 <a href="/alerts.cgi" class="sidebar-link[if:$active_alerts] active[/if]">
6067 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
6168 <span>Alerts</span>
6269 </a>
6370 <a href="/export.cgi" class="sidebar-link[if:$active_export] active[/if]">
6471 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
6572 <span>Compliance export</span>
6673 </a>
6774 <a href="/purge_log.cgi" class="sidebar-link[if:$active_purge_log] active[/if]">
6875 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
6976 <span>Purge log</span>
7077 </a>
7178
7279 <div class="sidebar-section-label">Configuration</div>
7380 <a href="[url:databases]" class="sidebar-link[if:$active_databases] active[/if]">
7481 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.7-4 3-9 3s-9-1.3-9-3"/><path d="M3 5v14c0 1.7 4 3 9 3s9-1.3 9-3V5"/></svg>
7582 <span>Databases</span>
7683 </a>
7784 <a href="[url:file_monitors]" class="sidebar-link[if:$active_file_monitors] active[/if]">
7885 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>
7986 <span>File monitors</span>
8087 </a>
8188 <a href="[url:servers]" class="sidebar-link[if:$active_servers] active[/if]">
8289 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="2" width="20" height="8" rx="2"/><rect x="2" y="14" width="20" height="8" rx="2"/><line x1="6" y1="6" x2="6.01" y2="6"/><line x1="6" y1="18" x2="6.01" y2="18"/></svg>
8390 <span>Servers &amp; agents</span>
8491 </a>
8592 <a href="[url:containers]" class="sidebar-link[if:$active_containers] active[/if]">
8693 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="7.5 4.21 12 6.81 16.5 4.21"/><polyline points="7.5 19.79 7.5 14.6 3 12"/><polyline points="21 12 16.5 14.6 16.5 19.79"/></svg>
8794 <span>Containers</span>
8895 </a>
8996 <a href="[url:settings]" class="sidebar-link[if:$active_settings] active[/if]">
9097 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M12 1v6m0 10v6M4.22 4.22l4.24 4.24m7.08 7.08l4.24 4.24M1 12h6m10 0h6M4.22 19.78l4.24-4.24m7.08-7.08l4.24-4.24"/></svg>
9198 <span>Settings</span>
9299 </a>
93100 </aside>
94101
95102 <main class="app-main">
96103 <header class="topbar">
97104 <h1>$page_title</h1>
98105 <div class="topbar-spacer"></div>
99106 <div class="topbar-user">
100107 <span class="initials">$user_initials</span>
101108 <span>$user_name</span>
102109 </div>
103110 </header>
104111 <div class="app-content">
105112$page_body
106113 </div>
107114 </main>
108115
109116</div>
110117<script src="/assets/js/tz_localize.js?v=$asset_version"></script>
111118<script src="/assets/js/ds_charts.js?v=$asset_version"></script>
112119<script src="/assets/js/ds_help.js?v=$asset_version"></script>
113120</body>
114121</html>
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.