Skip to content

Rollback is not a rewind but a new publication: SITEKODO's publication ledger

Yazar OVOKODO Ekibi · · 4 dk okuma

In short: In SITEKODO, returning to a previous version opens a new row in the ledger; it does not mark the old row live again. The returned version's files are rewritten with that day's bytes, not regenerated from sections. The files of the last 5 publications are kept; older ones keep their record but lose their content. All three decisions rest on one principle: a trace should record what happened then, not what is done today.

The problem: why is rolling back so easy to get wrong?

Rolling a site back looks simple: "return it to how it was." But that sentence hides three separate questions. What is returned: that day's files or that day's sections? What happens to history: is it erased or does it stay? How far back can you go: forever? Each question has an easy answer and each easy answer has a cost.

Decision 1: A rollback is a new publication

The easy answer: mark the old row "live again". It would be short and simple. SITEKODO does not do this: returning to a version opens a new row in the ledger of the "rollback" kind, showing which version it returned from.

Reasoning: A ledger that shows what is done today rather than what happened then is not a trace. Marking the old row live again would erase the story "this site was at version 3, then at version 5, then went back to version 3"; only "at version 3" would remain. When a new row is opened the story stands complete.

Decision 2: Files are not regenerated

The easy answer: regenerate the site from the returned version's sections. SITEKODO does not do this either: that day's files are rewritten exactly, with that day's bytes.

Reasoning: Sections may have changed since that day. What is regenerated would be not the "previous version" but an old shell of today's content. The rollback would claim to undo a change it had not undone. Writing the files exactly keeps what is said the same as what is done.

Decision 3: Only the files of the last 5 versions are kept

The easy answer: keep all of them forever. SITEKODO keeps the bodies of the last 5 publications; older rows have their bodies emptied but the row stays.

Reasoning: The need to return arises from mistakes noticed within a few publications, not days later. A version carries the whole HTML of the site; an unlimited number would slowly turn the database into a file server. The record of older rows stays: the fact that "this site was live on this date" outlives the fact of "can I return to this version". The screen says up front, in the list, which versions cannot be returned to.

| Decision | Easy answer | What we chose | Reasoning | |---|---|---|---| | What is a rollback? | Mark the old row live again | Open a new publication row | A trace keeps history | | How do files come back? | Regenerate from sections | Write that day's bytes exactly | What is said equals what is done | | How much is kept? | All of it | The last 5 versions | Bounds the resource; keeps the record |

The cost of these decisions

Every decision gives something up:

  • A limited number of versions. You cannot return to a version older than 5. If you want a much older state you must rebuild the sections by hand.
  • The ledger grows. Every rollback is a new row; but rows are small and bodies are kept only for the last 5.
  • No regeneration. You cannot update the sections and produce an "updated state" of the old version; you only get that day's state exactly as it was.

What does unpublishing do?

Unpublishing deletes the files and marks the ledger row "retracted". The record is not deleted. The same principle: withdrawing something does not erase the fact that it was once live.

What happens to files uploaded by hand?

Every new publication or rollback first empties the publish folder; hand-uploaded files are deleted. This is a deliberate decision too: a half-finished cleanup would mix the files of two versions in the same folder and a visitor could not know which one they saw. The screen shows this warning next to the publish button.

Does this principle apply elsewhere?

Yes. SITEKODO's DNS screen carries the same principle: every change writes into a ledger which record was changed, when, by whom and from what to what, and this ledger cannot be edited afterwards; because a trace that can change is not a trace.

Ready? Take a look at SITEKODO.

İlgili yazılar