Phase Lifecycle Reference
Kasten executes operations as ordered sequences of internal phases. Blueprint actions fire at specific points within these sequences. This page shows where blueprint actions fire relative to Kasten's internal phases.
Descriptions prefixed with Blueprint: indicate where Kasten calls blueprint actions. Rows marked Internal summarize one or more Kasten-managed phases that blueprint authors do not interact with.
For details on each action name and its timeout, see Reserved Action Names and Timeouts.
Backup Lifecycle
Kasten processes backups at two levels. Action hooks configured on a policy fire at the namespace level, wrapping the entire operation. Resource-bound blueprint actions bound through an annotation or BlueprintBinding fire per resource within the snapshot phase.
Namespace-Level Backup Phases
| Step | Phase | Description |
|---|---|---|
| 1 | Internal | Locks the target namespace |
| 2 | Action hook preHook |
Blueprint: Runs the action hook defined on the policy. |
| 3 | Internal | Discovers resources (including PVCs) and backs up manifests. Kasten discovers PVCs created during step 2 here. |
| 4 | Snapshot data | Processes each resource. See Per-Resource Backup Processing. |
| 5 | Internal | Backs up container images and finalizes the snapshot |
| 6 | Action hook onSuccess or onFailure |
Blueprint: Runs onSuccess if all earlier phases succeeded. Runs onFailure instead when an earlier phase failed and Kasten has exhausted retries. Only one runs. |
| 7 | Internal | Cleans up orphaned snapshots on failure |
Per-Resource Backup Processing
For each resource with a blueprint (within step 4 above), Kasten executes the following sequence:
| Step | Action | Condition |
|---|---|---|
| 4a | backupPrehook |
Blueprint: Runs if the blueprint defines this action. |
| 4b | PVC volume snapshots or backup |
Runs PVC volume snapshots by default. Blueprint: Runs the backup action instead if the blueprint defines it. See Logical Blueprints. |
| 4c | backupPosthook |
Blueprint: Runs if the blueprint defines this action. Always runs, even if step 4b failed. |
PVC discovery runs during step 3, before step 4. Kasten discovers
PVCs before backupPrehook executes. A PVC created during
backupPrehook is not included in the restore point.
To create a PVC that Kasten snapshots, use a preHook action
hook (step 2). Action hooks run before PVC discovery.
Backup Defer Phase Timing
Each action in steps 4a, 4b, and 4c can define its own
deferPhase. The defer
phase for a given action runs after that action's phases
complete. For example, a deferPhase on backupPrehook
runs after step 4a completes but before step 4b begins.
Restore Lifecycle
Restore also operates at two levels. Action hooks configured on a policy fire at the namespace level. Resource-bound blueprint actions fire per resource.
Namespace-Level Restore Phases
| Step | Phase | Description |
|---|---|---|
| 1 | Internal | Creates the target namespace, acquires holds and locks |
| 2 | Action hook preHook |
Blueprint: Runs the action hook defined on the policy. |
| 3 | Internal | Validates, restores namespace specs, resource specs, and volumes |
| 4 | Restore application | Restores workloads and processes each resource. See Per-Resource Restore Processing. |
| 5 | Internal | Restores images, custom resources, and performs cleanup |
| 6 | Action hook onSuccess or onFailure |
Blueprint: Runs onSuccess if all earlier phases succeeded. Runs onFailure instead when an earlier phase failed and Kasten has exhausted retries. Only one runs. |
| 7 | Internal | Releases holds and cleans up |
Per-Resource Restore Processing
For each resource with a blueprint (within step 4 above), Kasten executes the following sequence:
| Step | Action | Condition |
|---|---|---|
| 4a | restore |
Blueprint: Runs if the blueprint defines this action. See Logical Blueprints. |
| 4b | restorePosthook |
Blueprint: Runs if the blueprint defines this action. |
Kasten runs restore first and then restorePosthook, with
no internal phases between them. The choice of action depends
on how the blueprint handles data:
-
Logical blueprints (
backupandrestoreactions): The blueprint manages data movement. Kasten restores only PVC manifests, not PVC data. -
Snapshot-based blueprints (
backupPrehookandrestorePosthook): Kasten manages PVC data through its own snapshot and restore pipeline.
Export Lifecycle
Export transfers restore point data to the location profile configured on the policy. Resource-bound blueprints do not participate in the export lifecycle. Only action hooks fire during export.
| Step | Phase | Description |
|---|---|---|
| 1 | Internal | Acquires a hold on the restore point |
| 2 | Action hook preHook |
Blueprint: Runs the export pre-hook. |
| 3 | Internal | Initializes data mover, exports data, and cleans up |
| 4 | Action hook onSuccess or onFailure |
Blueprint: Runs onSuccess if all earlier phases succeeded. Runs onFailure instead when an earlier phase failed and Kasten has exhausted retries. Only one runs. |
| 5 | Internal | Releases the hold on the restore point |
Retire (Delete) Lifecycle
Retire runs when Kasten deletes a restore point, either through
retention policy or manual deletion. Action hooks do not
participate in the retire lifecycle. Only resource-bound
blueprints that define a
delete action fire
during retirement.
| Step | Phase | Description |
|---|---|---|
| 1 | Internal | Acquires locks and updates retention statistics |
| 2 | delete |
Blueprint: Runs the delete action for each resource-bound blueprint that defines it. Logical blueprints use this action to clean up external backups. |
| 3 | Internal | Removes artifact records and performs final cleanup |
The delete action does not run during export collection
retirement (when Kasten removes exported data from a location
profile).
For details on the delete action's execution context, see Delete Action Context.