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 = f

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Drop --version and run `pulumi stack export` to export the current (latest) deployment instead.
  2. Log in to Pulumi Cloud (`pulumi login`) and run the versioned export against the cloud-hosted stack.
  3. 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

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


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/3e3a454d0a19bcf1. Report an issue: GitHub.