Restore a person, folder or space to a point in time (ransomware recovery) #1104

Closed
opened 2026-11-04 03:11:14 +00:00 by Cordy · 4 comments
Owner

Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola; named by all four reports). Versions and Deleted files keep the data, but restores are one file version or one deleted item at a time. After a ransomware-encrypted sync client or a bad mass edit, an admin or owner cannot say "put this folder back as it was on Tuesday 08:00".

Competitors. ownCloud 10 Enterprise ransomware protection with ransomguard:restore (admin manual), with documented holes (thinned versions, emptied trash, moves inside shares) that Cairn's version design already avoids; Nextcloud occ trashbin:restore --since; Seafile library snapshots (help).

To research and decide when worked on. Dry run listing what would change; scope (person, device, folder, space); by time and optionally by device; renames and moves inside the range; legal holds; quota; audit; who may run it (admin, owner); interaction with the restore declaration (#904) and the change feed; long runs on more than one instance (#742).

Refs: scratch/b7e/backlog/gap-v07/research-v07-gaps.md A5.

**Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola; named by all four reports).** Versions and Deleted files keep the data, but restores are one file version or one deleted item at a time. After a ransomware-encrypted sync client or a bad mass edit, an admin or owner cannot say "put this folder back as it was on Tuesday 08:00". **Competitors.** ownCloud 10 Enterprise ransomware protection with `ransomguard:restore` ([admin manual](https://doc.owncloud.com/server/10.16/admin_manual/enterprise/security/ransomware-protection.html)), with documented holes (thinned versions, emptied trash, moves inside shares) that Cairn's version design already avoids; Nextcloud `occ trashbin:restore --since`; Seafile library snapshots ([help](https://help.seafile.com/file_folder_managing/library_history_and_snapshots/)). **To research and decide when worked on.** Dry run listing what would change; scope (person, device, folder, space); by time and optionally by device; renames and moves inside the range; legal holds; quota; audit; who may run it (admin, owner); interaction with the restore declaration (#904) and the change feed; long runs on more than one instance (#742). Refs: `scratch/b7e/backlog/gap-v07/research-v07-gaps.md` A5.
Author
Owner

Research done (scratch/b7e/backlog/research-1104.md). Market: OneDrive/SharePoint (30 days, activity chart, newer files to the recycle bin), Dropbox Rewind, Seafile snapshots, ownCloud ransomguard, Box Shield; Google Drive bulk restore GA since 2026-03-30; Nextcloud only trashbin:restore --since. Pitfalls: thinned versions and emptied trash defeat rollback, silent skips (SharePoint), re-infection from the still-running device (Dropbox), a recovery app that hard-deleted everything (Nextcloud). Cairn keeps per-file versions with actor and time and Deleted files with path, time and deleter, but has gaps: no durable rename/move record (G1), no device in any record (G2), pruned chains look like "created after T" (G3), a device password can probably purge Deleted files (G4). Recommended: a forward rewind made of normal writes/moves/deletes, always previewed, scoped to folder/space/person, optional person filter (device filter for changes recorded from now on), newer files to Deleted files, conflicts kept both, resumable job under a coord lease, undoable as a whole; new move journal per home/space. Decisions follow.

Research done (`scratch/b7e/backlog/research-1104.md`). Market: OneDrive/SharePoint (30 days, activity chart, newer files to the recycle bin), Dropbox Rewind, Seafile snapshots, ownCloud ransomguard, Box Shield; Google Drive bulk restore GA since 2026-03-30; Nextcloud only `trashbin:restore --since`. Pitfalls: thinned versions and emptied trash defeat rollback, silent skips (SharePoint), re-infection from the still-running device (Dropbox), a recovery app that hard-deleted everything (Nextcloud). Cairn keeps per-file versions with actor and time and Deleted files with path, time and deleter, but has gaps: no durable rename/move record (G1), no device in any record (G2), pruned chains look like "created after T" (G3), a device password can probably purge Deleted files (G4). Recommended: a forward rewind made of normal writes/moves/deletes, always previewed, scoped to folder/space/person, optional person filter (device filter for changes recorded from now on), newer files to Deleted files, conflicts kept both, resumable job under a coord lease, undoable as a whole; new move journal per home/space. Decisions follow.
Author
Owner

Decided by Nikola 2026-11-09:

  • Who runs: admins on any scope, space owners and managers on their space, each person on their own files; two admin switches, both on by default.
  • Files created after the chosen time go to Deleted files tagged with the run ("Keep these" in the preview), never destroyed.
  • As researched: preview first (younger than 15 minutes, checked per file); conflicts skipped and listed with "Restore these too", edits during the run keep both; a new move journal per home/space from this release (older renames keep current names, listed); person filter from day one, device filter for changes recorded from this release; "Pause {device} while restoring"; bell (+ optional e-mail), 14-day folder banner, a result list that stays; times inside a declared backup-restore window not offered; restored deletions show who deleted them and can be unticked; undoable as a whole; resumable job under a coord lease; on by default.
  • G4 (research research-1104-g4-unsettled.md): "Delete forever" needs a browser sign-in. Every device/app password gets 403 needs-session; refusals always audited (purge-refused), red bell and security e-mail once per device per 24 h; restoring stays allowed for devices. This reverses #900's "full means full" line for purge only, as #900 itself anticipated for the rewind. Follow-ups: #1152 (admin-recoverable second stage), #1153 (restore-only WebDAV Deleted files folder).
    Next: whole-page mockup.
**Decided by Nikola 2026-11-09:** - Who runs: admins on any scope, space owners and managers on their space, each person on their own files; two admin switches, both on by default. - Files created after the chosen time go to Deleted files tagged with the run ("Keep these" in the preview), never destroyed. - As researched: preview first (younger than 15 minutes, checked per file); conflicts skipped and listed with "Restore these too", edits during the run keep both; a new move journal per home/space from this release (older renames keep current names, listed); person filter from day one, device filter for changes recorded from this release; "Pause {device} while restoring"; bell (+ optional e-mail), 14-day folder banner, a result list that stays; times inside a declared backup-restore window not offered; restored deletions show who deleted them and can be unticked; undoable as a whole; resumable job under a coord lease; on by default. - **G4** (research `research-1104-g4-unsettled.md`): "Delete forever" needs a browser sign-in. Every device/app password gets 403 `needs-session`; refusals always audited (`purge-refused`), red bell and security e-mail once per device per 24 h; restoring stays allowed for devices. This reverses #900's "full means full" line for purge only, as #900 itself anticipated for the rewind. Follow-ups: #1152 (admin-recoverable second stage), #1153 (restore-only WebDAV Deleted files folder). Next: whole-page mockup.
Author
Owner

Mockup 1104-point-in-time-restore-mockup.html approved by Nikola 2026-11-09 with its open points as recommended: German "zurücksetzen" wording (admin tab "Earlier-time restores" / "Zurücksetzungen"); a permanent result page per run; people pause their own devices, admins anyone's (owner gets a bell), managers only their own; starting and undoing a restore need a browser sign-in; section-level "Keep these" / "Restore these too" with per-row checkboxes; hideable banner; plan streamed, 200 rows per page, soft warning above 10,000 files; "Untick all deleted by {name}"; affected people = those who saved/added/deleted a changed item plus space owner and managers; browser time zone named on screen; a person's own successful purge stays access-tier (revisit in #1152); Italian impersonal form. Next: spec and plan (batch b5v07, v0.6.405).

Mockup `1104-point-in-time-restore-mockup.html` approved by Nikola 2026-11-09 with its open points as recommended: German "zurücksetzen" wording (admin tab "Earlier-time restores" / "Zurücksetzungen"); a permanent result page per run; people pause their own devices, admins anyone's (owner gets a bell), managers only their own; starting and undoing a restore need a browser sign-in; section-level "Keep these" / "Restore these too" with per-row checkboxes; hideable banner; plan streamed, 200 rows per page, soft warning above 10,000 files; "Untick all deleted by {name}"; affected people = those who saved/added/deleted a changed item plus space owner and managers; browser time zone named on screen; a person's own successful purge stays access-tier (revisit in #1152); Italian impersonal form. Next: spec and plan (batch b5v07, v0.6.405).
Author
Owner

Shipped in v0.6.405 (PR #1154, merge 5e1a4df1), live on both dogfoods (v0.6.405, ready, 0 restarts, only pre-existing WARN lines).

What shipped: restore a folder, a space or Personal files to an earlier time: activity chart with spike hint, person filter (device filter for changes recorded from v0.6.405), preview with sections (Keep these, Restore these too, Untick all deleted by), Check again carrying choices, confirm with "Pause {device} while restoring", a resumable job under a coord lease with per-file checks (If-Match for content), added files to Deleted files tagged with the run, edits during the run kept both, Undo as a whole, Continue, Restore these too; a permanent result page that affected people can read once the run started; bell, optional e-mail, 14-day banner; Deleted files run groups; Administration › Retention & holds › Earlier-time restores with the two switches. New per-home/per-space move record (HMAC-keyed object names, compaction, export and deletion). G4: Delete forever needs a browser sign-in (403 needs-session for device and app passwords on every purge route, always audited purge-refused, red bell + security mail once per device per 24 h). The end-to-end test on posix and s3 with encryption on and off restores content, names and deletions, pauses the device and undoes cleanly.

Follow-ups: #1155, #1152 (admin-recoverable second stage), #1153 (restore-only WebDAV Deleted files folder). #742 residuals M1-M21 in ARCHITECTURE.md.

Shipped in **v0.6.405** (PR #1154, merge 5e1a4df1), live on both dogfoods (v0.6.405, ready, 0 restarts, only pre-existing WARN lines). What shipped: restore a folder, a space or Personal files to an earlier time: activity chart with spike hint, person filter (device filter for changes recorded from v0.6.405), preview with sections (Keep these, Restore these too, Untick all deleted by), Check again carrying choices, confirm with "Pause {device} while restoring", a resumable job under a coord lease with per-file checks (If-Match for content), added files to Deleted files tagged with the run, edits during the run kept both, Undo as a whole, Continue, Restore these too; a permanent result page that affected people can read once the run started; bell, optional e-mail, 14-day banner; Deleted files run groups; Administration › Retention & holds › Earlier-time restores with the two switches. New per-home/per-space move record (HMAC-keyed object names, compaction, export and deletion). G4: Delete forever needs a browser sign-in (403 `needs-session` for device and app passwords on every purge route, always audited `purge-refused`, red bell + security mail once per device per 24 h). The end-to-end test on posix and s3 with encryption on and off restores content, names and deletions, pauses the device and undoes cleanly. Follow-ups: #1155, #1152 (admin-recoverable second stage), #1153 (restore-only WebDAV Deleted files folder). #742 residuals M1-M21 in ARCHITECTURE.md.
Cordy closed this issue 2026-11-10 03:15:25 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1104
No description provided.