| name | pre-change-snapshot |
| description | Use when the user is about to run an action and wants a "pre" snapshot first. |
Pre-Change Snapshot
Create a "pre" snapshot to pair with a post-change snapshot for capturing deltas.
When to use
- Before running a complex operation (batch script, config migration, upgrade)
- Setting up a pre/post pair for change auditing
- Establishing a baseline before testing
Inputs to gather
- Snapper config name
- Description (what operation is about to run)
Procedure
- Preflight: Verify
snapper is installed and config exists.
- Run
sudo snapper -c <config> create --type pre --print-number -d "<description>".
- Capture the numeric ID from stdout.
- Print only the ID (e.g.,
42) so the caller can capture it for later pairing.
Output / side effects
Pre snapshot created. Returns numeric snapshot ID for caller to reuse with --pre-number <id> in a post-change snapshot.
Safety / constraints
Creates a read-only snapshot. Minimal space overhead. Requires sudo. ID is intended to be captured by a wrapping workflow.