Restoring Versions
A restore rolls something back to a point in time: "make this file exactly what it was on Tuesday at 5pm." It works on single files and on entire folder trees, and — like everything in Poly — a restore is itself just a new change in the history, so it can be undone too.
Restoring a file
From Flashback, right-click the version you want and choose Roll back to this (or right-click the timeline at an instant and choose Roll back file to here). From the terminal:
# Back to a moment in time (fuzzy dates work)
poly file restore //Home/docs/report.pdf --at "yesterday 5pm"
# Back to an exact revision from `poly file history`
poly file restore //Home/docs/report.pdf --at 018f3c2a
A restore computes the difference between the file then and the file now, and applies exactly the operations needed to close the gap — content, name, location, and metadata together. A few properties of the operation are worth knowing:
- It's one undoable action. However many properties the restore touches, they're grouped as a single change — one undo takes it all back.
- No re-download, no re-upload. Old content is already stored server-side, so restoring even a huge file is instant; nothing moves over the network.
- History is preserved. The versions between then and now aren't deleted — the restore lands on top of them, and the whole timeline stays browsable.
Restoring a folder
Rolling back a folder restores its entire subtree to the chosen instant. Poly walks the folder as it was then and reconciles every difference with the present:
- Files that changed are restored to their state at that moment.
- Files that were moved out since then are moved back in.
- Files that were archived since then are brought back.
- Files that were created after that moment don't belong in the restored state — they're moved to your Archive, not deleted, so nothing is lost.
Offline works here too: the rollback lands in your local cache immediately, shows up as history events, and syncs when you reconnect.
A few situations are deliberately skipped during a folder rollback — see Limitations.
Restore vs. revert
Restore answers "put it back how it was at time T." If instead you want "undo that one change, keep everything since" — a bad rename from last week, without losing this week's edits — you want Reverting Changes.