OrbitDocs

Guides

History and restore

See every version of a file, read the past, and bring an earlier version back.

Every change to a file adds a version. Versions are immutable: nothing you do later alters one. That makes history a dependable undo, whether the change came from Finder, the web app, an S3 tool or an agent.

In the web app

  • See versions. Choose Version history from a file's row menu, or open the file's details panel.
  • Restore. Choose Restore on a version. The file's contents become that version's contents.
  • Bring back a deleted file. Open Deleted files from the drive's ⋯ menu.
  • Undo a stretch of work. Open Activity. Each entry is the saves one person, agent or access key made together. Undo shows the files it would change before it changes them.
  • Mark a moment. Create checkpoint names the drive as it is now. Return to this checkpoint undoes everything changed since then, whoever changed it. Deleting a checkpoint removes only the name. The files and their history stay.

How restore works

Restoring doesn't rewind history. It adds a new version whose contents match the one you chose. The versions in between stay, so a restore can itself be undone.

v1  upload
v2  edit
v3  edit          <- you restore v1
v4  restore of v1 <- current

List versions over S3

The standard call works with any client:

aws s3api list-object-versions --bucket my-drive --prefix reports/q3.xlsx

For more detail about a single file, ask for its history as JSON. This uses the orbit() helper from Edit files in place.

history = orbit("GET", "/my-drive/reports/q3.xlsx?x-uls-versions").json()
{
  "key": "reports/q3.xlsx",
  "versions": [
    {
      "versionId": "v_01jd2k...",
      "isLatest": false,
      "size": 48213,
      "etag": "\"9b2cf5...\"",
      "lastModified": "2026-11-27T09:14:02.000Z",
      "operation": "put",
      "restoredFrom": null
    },
    {
      "versionId": "v_01jd4m...",
      "isLatest": true,
      "size": 48960,
      "etag": "\"4e17a0...\"",
      "lastModified": "2026-11-28T16:40:55.000Z",
      "operation": "write",
      "restoredFrom": null
    }
  ]
}

Versions are listed oldest first.

operationThe version came from
putAn upload of the whole file
writeAn in-place edit, or a save from Finder
copyA copy from another file
restoreA restore. restoredFrom names the version it copied.

Read an old version

Pass a version ID to any GetObject or HeadObject:

aws s3api get-object --bucket my-drive --key reports/q3.xlsx \
  --version-id v_01jd2k... ./q3-before.xlsx

Read a file as of a time

To read a file as it was at a moment, without looking up version IDs, send x-uls-as-of with an RFC 3339 timestamp:

old = orbit("GET", "/my-drive/reports/q3.xlsx", {"x-uls-as-of": "2026-11-27T12:00:00Z"})

You get the version that was current at that time. If the file didn't exist then, or was deleted, the response is 404 NoSuchVersion. Don't combine x-uls-as-of with versionId.

Restore a version over S3

POST /<drive>/<key>?x-uls-restore&versionId=<version ID>
response = orbit("POST", "/my-drive/reports/q3.xlsx?x-uls-restore&versionId=v_01jd2k...")
print(response.headers["x-amz-version-id"])   # the new, current version

The response also carries x-uls-restored-from with the version you restored. Add If-Match: <etag> to restore only if nobody has changed the file since you looked.

What history doesn't do

  • You can't delete a single version. DeleteObject with a versionId returns 501.
  • History isn't a backup. It lives in the same drive as the file. Keep an independent copy of data you can't afford to lose.
  • Versions use storage. Earlier versions and deleted files count toward the workspace's limit, though a version shares all the data it has in common with its neighbors.