Data & Portability

Every save keeps the version it replaced

A history for every record, on by default. Overwrite a paragraph or delete the wrong object and the previous state is one command away — and restoring it is never a one-way door.

Every time an object is saved, Total CMS keeps the version it just replaced. Every time one is deleted, it keeps the final state. Getting back a paragraph a client overwrote, or a record someone deleted, is one command, and there is nothing to set up: history starts with the first save after you update to 3.6.

It is a record history, not a site backup. Only the object's data is kept, never its uploaded images or files, so the footprint stays small: a snapshot is the size of the record's JSON. Snapshots live in the data directory beside the content they protect, so they survive application updates and travel with any backup you already take of tcms-data.

Two rules decide how much is kept. Each object keeps its ten newest snapshots, and anything older than 30 days goes regardless. Count alone would let one busy afternoon push out last week's version, the one you actually wanted; age alone would let an untouched record hold a snapshot forever. Identical consecutive saves don't stack duplicates, and bulk imports write no snapshots at all. Tune both numbers, or switch history off, under Settings → Backups.

Restoring happens on the command line. tcms backup:list shows an object's snapshots and tcms backup:restore puts one back. A restore is an ordinary save, written through the same path the admin uses, so the collection index rebuilds and every listener fires — and the version you just overwrote becomes the newest snapshot, so undoing a restore is another restore. A deleted object comes back the same way, though any files it referenced are only there if they were never removed from disk.

Sync shares the same history: when tcms push overwrites a schema, collection or object, the file it replaced lands in the same place.

What you get

Nothing to turn on

History starts with the first save after updating. Each save keeps the state it replaced; each delete keeps the last state the record had.

Small by design

Record data only, never uploads. The ten newest snapshots per object, nothing older than 30 days, both adjustable under Settings → Backups.

A restore is a save

It runs through the admin's own save path, re-indexes the collection, fires listeners and keeps what it replaced, so it can always be undone.

Deleted is not gone

The final state of a deleted object is kept. backup:list tells you the object is gone, and backup:restore brings it back.

In practice

One snippet

# See what's kept for one object
tcms backup:list blog my-post

# Put the newest snapshot back
tcms backup:restore blog my-post --latest

# Or a specific one, non-interactively
tcms backup:restore blog my-post my-post-20260919-091500.json --force

Both commands take --json for scripts. The first column of backup:list is what backup:restore takes.

FAQ

Common questions

Is there a restore button in the admin?

No. Snapshots are listed and restored with tcms backup:list and tcms backup:restore, and both take --json for scripts. The admin holds the settings: how many snapshots to keep, for how long, or history switched off entirely.

Does this replace my backups?

No. It is a history of records, not of files: uploaded images and files are never copied, which is what keeps it small. Keep backing up tcms-data with your host's tools; the snapshots live inside it, so they come along.

Can I keep more history on a busy site?

Yes. Raise Keep under Settings → Backups, or set backups.keep and backups.maxAgeDays in config/tcms.php, which wins over the admin and suits installs that share one data folder. A max age of 0 turns the age rule off.