Backtrack

Audit trail with restore for any model or Tailor section: who changed what, readable diffs, and one-click rollback.

$19

Product support

Read the plugin support instructions.

  • Added on Dec 1, 2026
  • Current version: 1.2.1
  • Platform Compatibility
    v4.x use latest
    v3.x not tested
    v2.x not tested
    v1.x not tested
  • License: Regular / Extended
  • Created by

Categories

Backtrack

Audit trail with restore for any model or Tailor section: who changed what, readable diffs, and one-click rollback.

Details

Backtrack records who changed what, and lets you put it back. Pick the models you care about in Settings and every create, change and delete is written to a tamper-evident audit trail, with a readable diff of each change and a restore button next to it. It works on models from any plugin and on Tailor sections, with no code changes, so agencies can show a client exactly what changed on their site and undo a mistake in a click.

Watch any plugin or Tailor section. The Settings page lists back-end administrators, the models of every plugin you have installed, grouped by plugin, and every Tailor section. Add the ones you want. Nothing is recorded until you do, and nothing needs to be changed in the other plugins. For Tailor, only published entries are recorded, so drafts never cause noise.

Know who, what, when and where. Each entry records the signed-in administrator, the time, whether the change came from the back end, the API, the website, the command line or a queue, the IP address, the page or command, and a batch that groups everything changed in the same request. An update stores only the fields that changed.

Read changes at a glance. Short text gets a word-by-word diff, long text a line diff, and JSON a path-by-path diff, so you see that one word changed, not that a whole field did. Filter the trail by event, model, where and date, search by record or user, and open a batch to see everything that one save touched.

Readable values, not codes. A dropdown shows "Proposal", not 3. A switch reads Yes or No, an owner shows as a name, and each field carries its label from the plugin's own form. Ticked boxes and tags show what was added and removed. Hover any label to see the stored value. The labels come from the form's own options, so dependent and database-backed dropdowns work, and anything that cannot be labelled is shown as stored.

A History tab on every record. Every tracked model's edit form gets a History tab with its latest entries and a link to its full history. It is added for you, so it works in plugins you did not write.

Put it back. Revert a whole change or a single field, undo a creation, bring back a deleted record, or return a record to the way it was at an earlier entry. Revert a whole batch in one go. If the record has changed since, the confirmation names the fields and asks again before it overwrites anything. Restores go through the model, so validation and events run, they happen all or nothing, and each one is recorded as a Restored entry that points at the entry it undid. History is never rewritten.

Keep secrets out. Passwords, tokens, secrets, API keys, codes, hidden attributes and encrypted attributes are recorded as changed, never with their values. The patterns are editable, and each model can also have fields it records only or never records.

Tamper-evident for compliance. Entries cannot be edited or deleted in the back end. Each carries a hash that includes the entry before it, and a command checks the whole chain and reports the first entry that does not match, so it can run from a monitor. Keep the newest hash somewhere else and the command also shows when entries at the end were removed. Entries are removed only by a nightly retention clean-up that leaves a checkpoint, so the chain still verifies afterwards, and it refuses to run on a chain that is already broken.

Client sign-off. Give your client a role that can only view the trail and sign off changes. They tick what they have checked, add a note, and sign off, one change or a whole batch at a time. Each change is signed off once, nobody signs off their own work unless you allow it, and the sign-off is kept on record with who, when and the note. Sign-offs are chained too, so a signed entry that is later changed or removed is found.

Export for compliance. Download the trail, with the filters you applied and the sign-offs, as a CSV for a client or an auditor. Values that could run as a spreadsheet formula are made safe.

Permissions. View the audit trail, restore changes, sign off changes, export the trail and manage settings are separate permissions, and restoring and signing off are checked again when they are done. Restoring can change any tracked record, so changes to administrators, roles and groups need a super user, and one setting limits every restore to super users.

Requirements

  • October CMS 4.4 or newer, on PHP 8.2 or newer.
  • For the nightly retention clean-up, October's scheduler (the usual cron entry).
  • No other plugins are needed, and Backtrack uses no third-party libraries.

Good to know

  • Changes are recorded from model events. Bulk query builder updates and raw SQL do not trigger them and are not recorded.
  • Labels use today's names, and Tailor fields that point at other entries show as stored.
  • A sign-off cannot be withdrawn, and there is no email notification.
  • Only a record's own columns are recorded and restored. Many-to-many relationships and file contents are not.
  • The chain is tamper-evident, not tamper-proof: someone with full database access could rewrite all of it. The documentation explains how to check it and what it can and cannot show.
  • Anyone who can view the trail can see the recorded old and new values, so give that permission with the same care as access to the records. Likewise, the restore permission can change any tracked record.
  • The interface is in English. All text is kept in a language file, so other languages can be added.

Licensing

Backtrack is commercial software with the source code included. Any use needs a license for each installation or site, and development, test and staging copies of a licensed installation are covered. The full terms are in the LICENSE file that comes with the plugin.

Installation via Command Line

php artisan plugin:install Ndcisiv.Backtrack

Requirements and setup

Backtrack needs October CMS 4.4 or newer and PHP 8.2 or newer. It needs no other plugins and no third-party libraries.

Install the plugin from the Marketplace. October runs its migrations, which create the tables. If migrations are ever pending, run php artisan october:migrate.

Entries are removed by a nightly retention clean-up that runs from October's scheduler. For production, set up the scheduler: a cron entry that runs php artisan schedule:run every minute. Nothing else is needed. Entries are written while the change is saved, with no queue.

Permissions

Give users the permissions they need on their role, under the Backtrack tab. Superusers can do everything.

Permission Allows
View the audit trail Open the Audit trail, entries, batches and record histories, and see the History tab
Restore changes Use the revert, undo and restore buttons. It can change any tracked record, see Who can restore
Sign off changes Sign off entries and batches, with a note
Export the audit trail Download the trail as CSV
Manage Backtrack settings Open Settings, Backtrack

Anyone who can view the audit trail can see the recorded values of the tracked fields, so give that permission with the same care as access to the records themselves. Restoring is checked when a restore is made, not only by hiding the buttons.

Choose what to track

  1. Open Settings, Backtrack.
  2. Under Tracked models, choose Track a model and pick one. The list shows back-end administrators, the models of every enabled plugin grouped by plugin, and every Tailor section under Tailor. Settings models and logs are not offered.
  3. Optionally fill Only these fields (the model's other fields are not recorded) or Never these fields, separated by commas.
  4. Save.

Nothing is recorded until a model is added. A model that is removed again stops being recorded, and its earlier entries stay in the trail, but they can no longer be restored until it is tracked again.

Masked fields

A field whose name matches a pattern under Masked fields is recorded as changed, without its old or new value. One pattern per line, and * matches anything. The defaults are password*, *token*, *secret*, *api_key* and *_code. Hidden and encrypted attributes of a model are always masked. A masked field cannot be restored, because its value was never stored.

Command line and queue

Changes made by seeders, imports, commands and queue workers are not recorded unless Record command line and queue changes is switched on. It is off by default so that bulk work does not flood the trail.

Administrators

Signing in and out changes an administrator's last login and a session code. Backtrack never records those two columns, so signing in does not add an entry. Other changes to administrators, such as a new name, email or password, are recorded as usual.

Tailor

Tailor sections are recorded by section, for example Blog/Post. Only published entries are recorded. Drafts and unsaved copies are ignored, and publishing a new entry counts as its creation. Tailor's own bookkeeping columns, such as the blueprint, draft state and user footprints, are left out.

Read the trail

Open Backtrack, Audit trail. Each row is one change. Filter by event, model, where (back end, API, website, command line or queue) and date, and search by record or user. Open a row to see the entry.

An entry shows who made the change, when, where it came from, and a diff of each field:

  • Short text is compared word by word, with removed words struck through and added words highlighted.
  • Long text and text with line breaks is compared line by line.
  • JSON is compared path by path, so a change deep inside a repeater shows only the path that changed.
  • Numbers and other plain values show the old and new value.
  • A masked field is listed as changed, without values.

Choose Everything changed in the same request to open the batch, which shows every entry written by one request, command or queued job together.

Readable values

Where a person would otherwise read a code, Backtrack shows the label.

  • Dropdowns, radios and balloon selectors show the option's label ("Proposal") instead of the stored value (3). The labels come from the plugin's own form (fields.yaml) and options, the way the form shows them: an inline list, a method on the model, a Class::method, a preset, or the model's get{Field}Options. Options that depend on other fields, on the record's state, or that are read from the database all work, because the old value is looked up with the record as it was and the new value as it became.
  • Switches and checkboxes read Yes or No.
  • Foreign keys show the name of the record they point to. Switch off Show the names of related records in Settings, Backtrack, if the people who view the trail should not see those names.
  • Every field shows its label from the form, with its stored name beneath it. A field the form does not mention shows its stored name.
  • Lists, such as ticked boxes or tags, show the items that were added and removed and the ones that stayed, with labels where the field has options. The same items in a different order are shown as reordered.
  • Hover a label to see the stored value.

The trail itself always keeps the stored values, so nothing is lost if a label cannot be found, and the CSV export has the stored names and values. Labels are looked up when a page is shown, so they use today's names. Showing them runs the other plugin's options code, and a plugin whose options fail, or that has none, simply shows the stored value. At most 200 labels are looked up for one page. Tailor sections get their field labels, dropdown and radio options and yes or no switches from the section's blueprint. Entries, repeaters and file fields are shown as stored.

Saves that only rewrite a value

A save that only writes a value differently is not recorded: NULL as an empty string, 49.00 as 49 or 49.0, 5 as 05, or true as 1. Zero and false are values, and any other difference, including a change of case, is recorded. Switch on Record changes that only rewrite a value in Settings, Backtrack, to record every difference. Entries already recorded are not changed.

The History tab

When you edit a record of a tracked model, its form has a History tab listing the latest 20 entries for that record, with a link to its full history. The tab is added automatically to saved records for users who can view the audit trail. To place it yourself, add a field to the form's fields.yaml:

_backtrack_history:
    type: backtrackhistory
    tab: History

It saves nothing to the model.

Export

Export CSV on the Audit trail page downloads the entries the list is showing, oldest first, with the list's filters and search applied. It needs the export permission. A value that begins with =, +, - or @ is prefixed so a spreadsheet does not run it as a formula.

Restore

Restore buttons appear for users who can restore changes.

Button On Does
Revert this change an update Puts the old values of every changed field back
Revert (on a field row) an update Puts back the old value of that one field
Undo this creation a creation Deletes the record that the entry created
Restore this record a deletion Brings the record back. A soft-deleted record is restored in place. A permanently deleted record is rebuilt from the snapshot with its original id, if that id is free
Restore the record to this point an entry that is not a deletion and not the newest for its record Puts the record back the way it was right after that entry
Revert everything in this batch a batch Undoes every record the batch touched

A restore is planned before anything is changed. If a field no longer holds the value the entry set, the confirmation lists the fields that changed since and asks you to confirm. Without that confirmation nothing is changed.

A restore saves through the model, so validation and model events run. If any part of it is refused, nothing is changed. A successful restore is recorded as a Restored entry that links to the entry it undid, in a batch of its own, so the trail shows both the change and its undoing.

A restore is not possible when the model is no longer tracked, when the record or its id has changed in a way that makes the restore meaningless (for example a deleted record whose id is in use again), or when the record already holds the old values.

Who can restore

Restoring writes to the tracked record itself, so Restore changes lets a person change any record you track, whatever their own access to that record. Give it only to people who may edit everything you track.

  • Changes to back-end administrators, roles and groups can only be restored by a super user, because restoring one could hand out access, for example by putting back a super user's status or permissions. Anyone else sees the reason on the entry instead of the buttons, and the restore is refused if it is attempted anyway.
  • To limit every restore to super users, switch on Only super users can restore in Settings, Backtrack.
  • Someone who is not signed in is never treated as a super user.

Sign-off

Sign-off lets a reviewer, usually your client, approve the changes they have checked, and keeps that on record.

Give the person a role with View the audit trail and Sign off changes. That is all they need. They can then:

  • tick changes in the Audit trail and choose Sign off selected,
  • open an entry and choose Sign off, or
  • open a batch and choose Sign off this batch, which signs every entry in the batch that is still open.

A dialog says how many changes will be signed off, how many are skipped because they are already signed off, and how many are skipped because the signer made them. It asks for an optional note.

Rules:

  • A change is signed off once.
  • Nobody signs off a change they made themselves, unless Allow signing off your own changes is on in Settings, Backtrack. Changes made by the command line or a queue have no person, so anyone with the permission can sign them off.
  • Require a note to sign off makes the note mandatory. A note can be up to 1,000 characters.
  • Sign-offs cannot be edited, deleted or withdrawn. If one was made by mistake, record a later change and a note.

The Audit trail has a Sign-off column showing who signed and the date, and a filter: all, signed off, or not signed off. An entry shows the sign-off with its note. The History tab, the record history page and the CSV export (signed_off_by, signed_off_at, signoff_note) include it.

Each sign-off keeps the hash of the entry as it was when it was signed, and sign-offs are chained to each other. backtrack:verify therefore also reports an edited sign-off, a signed entry that was changed, and a signed entry that was removed, even from the end of the trail. Retention removes old entries but keeps their sign-offs.

Verify the trail

Each entry stores a hash of its content and of the entry before it. Check the whole chain with:

php artisan backtrack:verify

It reports the first entry, checkpoint or sign-off that does not match, and why, and exits with an error. When the chain is intact it prints how many entries, checkpoints and sign-offs it checked and the newest hash.

A chain cannot show that the newest entries were removed. To cover that, note the newest hash somewhere outside the database, and check it later:

php artisan backtrack:verify --expect=<hash>

The command fails if that hash is no longer in the chain. The chain is tamper-evident, not tamper-proof: someone with full database access could recompute every hash.

Retention

Settings, Keep entries for (days) sets how long entries are kept. The default is 365 and 0 keeps entries forever. Once a night, at 03:40, October's scheduler runs the clean-up, which removes the oldest entries up to the first one that is still inside the period.

The clean-up leaves a checkpoint that records the last removed entry's hash, so the entries that remain still link to something and verification keeps working. It does not run on a chain that is already broken, so evidence is not removed along with old entries.

To run it by hand:

php artisan backtrack:prune --dry-run
php artisan backtrack:prune --days=90

--dry-run counts what would be removed, and --days overrides the setting for that run.

Limits

  • Changes are recorded from model events. Bulk query builder updates and deletes, raw SQL and Db::table() do not trigger them and are not recorded.
  • Only a record's own columns are recorded and restored. Many-to-many relationships and file contents are not.
  • A failed write to the trail is logged and does not undo the change that was already saved.
  • Rebuilding a permanently deleted record can fail on a required column that was masked or on a database constraint. Nothing is changed when it does.
  • Labels use today's names, and Tailor fields that point at other entries show as stored.
  • Entries older than the retention period are removed, and cannot be restored. Their sign-offs are kept.
  • A sign-off covers one entry at a time. There is no withdrawing a sign-off, signing off a date range, or email notification.
1.2.1

Tailor sections show field labels and option labels from their blueprint

Nov 23, 2026

1.2.0

Field labels, option labels and relation names are shown on the entry pages, and saves that only change how a value is written are no longer recorded

Nov 23, 2026

1.1.1

Only super users can restore changes to administrators, roles and groups, and a setting limits restoring to super users

Nov 23, 2026

1.1.0

Client sign-off of entries with a note and its own hash chain

Nov 23, 2026

1.0.0

First release of Backtrack

Nov 23, 2026