pulumi/pulumi · error
the current backend (%s) does not provide the ability to exp
Error message
the current backend (%s) does not provide the ability to export previous deployments
What it means
`pulumi stack export --version N` asks the backend to fetch a specific historical deployment. Only backends implementing backend.SpecificDeploymentExporter (Pulumi Cloud) can do this. When a --version is given and the stack's backend does not implement that interface, the command returns this error naming the backend (e.g. 'local'). Without --version the export works on any backend, since it exports the latest deployment from local state.
Source
Thrown at pkg/cmd/pulumi/stack/stack_export.go:87
)
if err != nil {
return err
}
var deployment *apitype.UntypedDeployment
// Export the latest version of the checkpoint by default. Otherwise, we require that
// the backend/stack implements the ability the export previous checkpoints.
if version == "" {
deployment, err = backend.ExportStackDeployment(ctx, s)
if err != nil {
return err
}
} else {
// Check that the stack and its backend supports the ability to do this.
be := s.Backend()
specificExpBE, ok := be.(backend.SpecificDeploymentExporter)
if !ok {
return fmt.Errorf("the current backend (%s) does not provide the ability to export previous deployments",
be.Name())
}
deployment, err = specificExpBE.ExportDeploymentForVersion(ctx, s, version)
if err != nil {
return err
}
}
// Read from stdin or a specified file.
writer := cmd.OutOrStdout()
if file != "" {
f, err := os.Create(file)
if err != nil {
return fmt.Errorf("could not open file: %w", err)
}
defer contract.IgnoreClose(f)
writer = fView on GitHub (pinned to 793f7b2e16)
Solutions
- Drop --version and run `pulumi stack export` to export the current (latest) deployment instead.
- Log in to Pulumi Cloud (`pulumi login`) and run the versioned export against the cloud-hosted stack.
- If the old state is local, look in the backend file storage (e.g. ~/.pulumi/stacks) for historical checkpoints rather than using --version.
Example fix
// before pulumi login --local && pulumi stack export --version 3 -s dev // after pulumi stack export -s dev # latest, works on any backend # or: pulumi login && pulumi stack export --version 3 -s my-org/my-project/dev
Defensive patterns
Strategy: fallback
Validate before calling
# only pass --version when on the Pulumi Cloud backend if pulumi backend | grep -qi local; then unset VERSION_FLAG; fi
Type guard
// Go: check the backend capability before requesting a versioned export
be := s.Backend()
specificExpBE, ok := be.(backend.SpecificDeploymentExporter)
if !ok {
return fmt.Errorf("backend %s cannot export previous deployments", be.Name())
} Prevention
- Only use `--version` against Pulumi Cloud stacks.
- Fall back to plain `pulumi stack export` for local backends.
- Archive old local checkpoints manually if history is needed offline.
When it happens
Trigger: Running `pulumi stack export --version <n>` against the local file backend (`pulumi login --local`) or any backend that lacks SpecificDeploymentExporter.
Common situations: Trying to recover an old deployment from a locally logged-in stack; assuming --version works everywhere because it works on Pulumi Cloud; migrated projects whose old state lived on the local backend.
Related errors
- could not determine current cloud: %w
- %s is not a valid self-hosted backend, use `pulumi login` wi
- oidc-token, oidc-org, oidc-team, oidc-user, and oidc-expirat
- unable to set default org for this type of backend
- could not log in to the state backend %q: %w %s
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/3e3a454d0a19bcf1.
Report an issue: GitHub.