ubx rollback computes the diff between the current deployed state and a target snapshot, then prompts to confirm and apply the rollback. The target can be a date or a git SHA prefix.
Usage
Flags
| Flag | Description |
|---|---|
--dry-run | Show the diff and exit without prompting or applying |
Arguments
| Argument | Description |
|---|---|
<date> | Date in YYYY-MM-DD format |
<sha> | Git SHA prefix (at least 6 characters) |
Examples
What happens
- Loads the apply history from
ubx-history.json(or legacy SQLite) - Finds the snapshot matching the date or SHA
- Computes the diff between that snapshot and the current state
- Displays the diff
- Prompts
Apply rollback to "<target>"? [y/N]unless--dry-run
Dry-run output
Rollback note
After confirming, ubx records the rollback intent but does not automatically apply it. The next step is:- Revert the relevant
.xclfiles to match the target state - Run
ubx shipto apply the changes
Exit codes
| Code | Meaning |
|---|---|
0 | Rollback plan displayed (or applied) |
1 | No history found, or user cancelled |

