Version Control

Track every change to a RodSim simulation. PetroBench saves a snapshot every time you run, restore, duplicate, or import. Compare versions, restore previous states, and clean up old ones.

Version history is available on the Enterprise package only.

Every RodSim simulation has a built-in version history. PetroBench saves a snapshot whenever something significant happens (a run, a duplicate, an import) and each version is fully restorable.

How Versions Get Created

PetroBench creates a version automatically. Two categories, seven triggers.

CategoryTriggerWhen it fires
Base CaseCreateFirst time the simulation is created
ImportImported from a RodStar or SRod file
SyncData bridge synced from an external system
AutoRunAfter a static or dynamic simulation finishes
DuplicateWhen you duplicate the simulation
RestoreWhen you restore a previous version
MigrationSystem migrated the simulation schema

Base Case versions mark the original state of the simulation. Auto versions cap and get cleaned up over time.


1. Open Version History

  1. Open the simulation
  2. Click the Version History icon in the top-right toolbar
  3. The history sheet slides in from the right

Each version shows:

  • Version number (v1, v2, ...)
  • Trigger badge (Simulation Run, Duplicated, Restore)
  • Date and time, who triggered it
  • Inline diff of what changed since the previous version (e.g. 17 changes since v2) with red strikethroughs and green new values
  • Add note button to label the version
  • Restore button (on every version except the current one)
  • Current green tag on the latest version


2. Add a Note

Notes turn an auto-generated version into a labeled one, which protects it from cleanup and makes it findable later.

  1. Click Add note under any version
  2. Type the label (for example, "Version 3 Note" or "Before rod redesign")
  3. Click the green check to save

To change a label later, hover the version and click Edit note.

Add a note to any version you want to keep around. Cleanup never touches a labeled version.


3. Compare Versions

Two flows.

3.1 Compare a Version Against Current

Default flow when you have one version selected (or zero, in which case it picks the most recent).

  1. Open the history sheet
  2. Click Compare with current at the bottom

The Compare view shows two columns side-by-side. The tab strip across the top groups changes by section with counts:

TabShows
AllEvery changed field across the simulation
Simulation PreferencesTargets, damping, step length
Well DataFluid properties, pump specs, pumping unit
Tubing DataPSN depth, anchor, tubing string
Rod DataRod taper string
IPR DataReservoir test data

The toggle in the top-right (Changes only) hides identical fields so you only see what differs.

3.2 Compare Two Versions

  1. In the history sheet, tick the checkboxes on two versions
  2. Click Compare with current (the button label shifts to compare the two)

The diff layout is the same. Use the chevron arrows in the top-right of the Compare view to step through versions without leaving the page.


4. Restore a Version

From the Compare view, click the Restore to v[N] button in the bottom-right. From the history list, click Restore on any version.

The dialog confirms:

Restore to v2? This will revert the simulation to the selected version. A backup of the current state will be saved automatically before restoring.

Click Restore. PetroBench:

  1. Saves the current state as a new version (so the rollback itself is reversible)
  2. Replaces the simulation inputs with the snapshot
  3. Adds a new version with trigger Restore and a "Restored from v[N]" label

You cannot restore while a dynamic simulation is currently running. Wait for it to finish.

If a restore is blocked, the sheet shows "This version cannot be restored" with the reason.


5. Cleanup Old Versions

Cleanup is restricted to Admin app roles. Engineers can create and restore versions but cannot delete them.

Auto Run versions can pile up fast. Use Cleanup to thin them out without losing the ones you care about.

  1. In the history sheet, click Cleanup
  2. Pick a scope:
OptionWhat gets deleted
Delete all old versionsEvery unlabeled auto version except the most recent
Older than 7 daysAuto versions older than 7 days
Older than 30 daysAuto versions older than 30 days
Older than 90 daysAuto versions older than 90 days

The popup tells you exactly how many will be removed: "2 unlabeled version(s) eligible for cleanup. Labeled versions and the latest version are always preserved."

The Filter by trigger selector at the top of the same popup lets you narrow the scope to specific trigger types (only Run, only Duplicate, etc.) before running cleanup.


Permissions

Version actions check role permissions:

ActionRequired permission
View historyView simulation
CompareView simulation
Edit noteEdit simulation
RestoreEdit simulation
Delete / CleanupAdmin role only

If you don't have permission for an action, the button stays visible but disabled with a tooltip explaining why.


What's Next

On this page