Skip to main content

Load a Savepoint from a Custom Location

Ververica Platform lets you start a deployment from a savepoint stored at any accessible storage location, not only savepoints managed within the platform. Use this when restoring state from an external source, such as a savepoint taken from a VVP 2 deployment.

Load from the UI

note

The deployment must be in the CANCELLED state before you can add a savepoint manually.

  1. In the left navigation, click the Namespace selector and select the namespace that you want to open.
  2. Click Deployments.
  3. Create a new deployment using a JAR or artifact that is compatible with the savepoint. The deployment is created in the CANCELLED state.
  4. Click the deployment name to open the deployment details.
  5. Display the State tab, then click the History tab.
  6. Click Add Savepoint Manually.
  7. Enter the full savepoint URI (for example, s3://my-bucket/savepoints/savepoint-abc123), then click Add.
  8. Confirm that the new entry in the Savepoints section shows Origin: COPIED and Status: COMPLETED.
  9. Start the deployment. It resumes from the savepoint you provided.

Load Using the Kubernetes Operator

The Kubernetes Operator supports loading from a custom savepoint location through the spec.initialSavepointSpec.savepointLocation field. This requires two sequential kubectl apply operations.

Step 1: Register the Savepoint

Apply a CR that sets the deployment state to CANCELLED and includes initialSavepointSpec:

apiVersion: ververica.platform/v1
kind: VvpDeployment
metadata:
name: my-deployment
namespace: vvp-system
spec:
syncingMode: PATCH
initialSavepointSpec:
savepointLocation: s3://my-bucket/savepoints/savepoint-abc123
deployment:
userMetadata:
name: my-deployment
namespace: default
displayName: my-deployment
spec:
state: CANCELLED
deploymentTargetName: my-target
template:
spec:
artifact:
jarUri: file:///opt/flink/examples/streaming/MyJob.jar
kind: JAR

Wait until the savepoint appears in the deployment's state history with status COMPLETED.

Step 2: Start the Deployment

Apply a second CR with state: RUNNING. Omit initialSavepointSpec in this step:

apiVersion: ververica.platform/v1
kind: VvpDeployment
metadata:
name: my-deployment
namespace: vvp-system
spec:
syncingMode: PATCH
deployment:
userMetadata:
name: my-deployment
namespace: default
displayName: my-deployment
spec:
state: RUNNING
deploymentTargetName: my-target
template:
spec:
artifact:
jarUri: file:///opt/flink/examples/streaming/MyJob.jar
kind: JAR

The deployment starts and restores state from the savepoint.

warning

initialSavepointSpec is only applied when the deployment does not yet exist. Remove it from the CR after the deployment is created. If left in place and the deployment is later cancelled and recreated, the operator references the original savepoint again, overwriting any newer savepoints.

note

restoreStrategy must not be set to NONE. The default value LATEST_STATE is compatible with this approach.

Example: Migrate State from VVP 2 to VVP 3

  1. In VVP 2, trigger a savepoint on the running deployment and record the savepoint path (for example, s3://my-bucket/vvp2-jobs/namespaces/ns/jobs/abc123/savepoints/savepoint-xyz).
  2. In VVP 3, create a new deployment using an artifact that is compatible with the VVP 2 job's state schema.
  3. Use either the UI or Operator approach above to load the VVP 2 savepoint path.
  4. Start the deployment. It resumes from the state captured in VVP 2.

Troubleshooting

ProblemLikely causeResolution
Savepoint stays in PENDINGThe URI is unreachable or incorrectly formattedVerify the path and confirm the Ververica Platform pod has read access to the storage location.
Deployment fails on startThe savepoint is incompatible with the jobConfirm the artifact is state-compatible with the savepoint. Operator and schema changes between VVP versions can cause restore failures.
initialSavepointSpec has no effectThe deployment already existsThis field is applied only when the deployment is first created. Delete the deployment and apply the CR again.