OrbitDocs

Guides

Fork a drive

Make an independent copy of a drive in seconds, without copying any data.

A fork is a new drive that starts with every file, folder and version the source held at the moment you forked. The two drives share stored data until one of them changes, so a fork of a 2 TB drive doesn't take 2 TB or the time to copy it.

After the fork, the drives are independent. Nothing written to one appears in the other.

When to fork

  • An agent or script needs to write. Give it a fork and a key limited to that fork. Your drive can't be damaged by a mistake.
  • You want to try something destructive. Run the batch rename or the migration on a fork first.
  • Two people need diverging copies of the same starting material.

Fork from the web or Mac app

In the web app, open the drive's menu in the sidebar and choose Fork. In the Mac app, choose Fork… from the drive's … menu. Name the copy. It appears in your drive list like any other drive.

Forking needs the admin or owner role in the workspace.

Fork over S3

Create a bucket and name the source in x-uls-fork-source. The key needs full control and must be able to reach the source.

PUT /<new-drive>
x-uls-fork-source: <source drive name or ID>

Using the orbit() helper from Edit files in place:

response = orbit("PUT", "/footage-experiment", {"x-uls-fork-source": "footage"})

fork_id = response.headers["x-uls-drive-id"]
print(fork_id, response.headers["x-uls-fork-point"])
Response headerValue
x-uls-drive-idThe new drive's ID
x-uls-fork-source-idThe source drive's ID
x-uls-fork-pointThe moment the fork was taken, as an RFC 3339 timestamp

The fork contains every write the source had acknowledged before your request. It is in the same region as its source.

Give the fork to an agent

Create a child key that can reach only the fork, and hand that to the agent in place of your own key:

{ "drives": ["<fork_id>"], "access": "write", "label": "agent-run-42" }

With that key, the agent can read and write the fork and sees no other drive.

Keep or discard the result

Review the fork like any drive: open it in Finder, browse it on the web, or list it over S3.

  • To discard it, delete the fork. The source is untouched.
  • To keep some files, copy them into the source. A copy between drives transfers the data:
rclone copy orbit:footage-experiment/selects orbit:footage/selects
  • To keep everything, merge the fork back, or use the fork as the drive from now on.

Merge a fork back

Merging brings the fork's changes into the drive it was made from, as one change you can undo. No data is copied: the source drive takes over the fork's stored blocks.

In the web app, open the fork and choose Review changes in its sidebar menu, or Compare with the original on the fork itself. Orbit compares three states of every path the fork touched: the moment of the fork, the fork now, and the source now. Each change is marked:

  • Ready to merge: only the fork changed it. Merging applies it.
  • Already in the original: both drives ended up with the same content. Nothing to do.
  • Conflicts: both drives changed it differently. It is skipped unless you choose the copy's version for that file. The source's version stays in its history either way.

Orbit does not combine two edits to the same file. A file both sides changed is a conflict, whatever its format.

A merge fails without changing anything if either drive changed after the comparison you reviewed, so what you approve is what is merged. To take a merge back, open the source drive's Activity and undo it; files someone changed afterwards are left alone. The same undo is the MCP tool undo_changes.

Inspect a drive

info = orbit("GET", "/footage-experiment?x-uls-drive").json()

The response describes the drive: its driveId, name, creation time, the storage it uses on its own in usageBytes, and in forkOf the source and fork point if it is a fork.

Storage and limits

  • A fork uses no storage when created. It is billed only for data written to it afterwards. See what counts toward storage.
  • A workspace can have up to 50 forks at a time.
  • You can fork a fork, up to 8 levels deep.
  • Forks don't count toward the Individual plan's one-drive limit.