Skip to main content

Overview

fjall restore starts an AWS Backup restore job for an S3 bucket, EBS volume, RDS database or EC2 instance. The restore runs inside AWS Backup, not CloudFormation. Fjall starts the job and hands you the job ID plus a console link, then AWS Backup does the work.

Prerequisites

Usage

Arguments

An unrecognised value exits immediately with Error: Invalid resource type '<value>' and the list of valid types.

Options

-n, --name applies to RDS restores only — it becomes the restored instance’s DBInstanceIdentifier. Passing it with s3, ebs or ec2 is refused, because those resources take the name AWS Backup derives from the recovery point and there is nowhere to put one. The name must satisfy AWS’s identifier rules: 1 to 63 characters, letters and digits only apart from separating hyphens, starting with a letter, no trailing hyphen and no two consecutive hyphens. Underscores, dots and spaces are refused.
Fjall reads the recovery point’s own restore metadata before starting the job, because AWS Backup requires the settings the backup was taken with. That read looks in the Default vault unless you name another with --backup-vault. The interactive picker already knows the vault it selected, so the flag is for one-shot and agent runs.

Agent flags

These flags shape output for AI agents and scripted callers.

Interactive or one-shot

Fjall picks the mode from the terminal, not from the arguments you pass.
The picker ignores resource and --recovery-point. On a normal terminal, fjall restore rds --recovery-point arn:... opens the picker at “What type of resource would you like to restore?” and those flags are discarded. Add --non-interactive whenever you want them honoured. -n, --name is the exception: the picker seeds its Database instance name: prompt with it, and you can still edit it there. If you pass it and then pick a type that cannot carry a name, the restore is refused at the confirmation rather than starting without it.

Interactive restore

The picker steps through:
  1. Resource category (What type of resource would you like to restore?): Compute or Storage.
  2. Resource type (Select compute resource type: for EC2, or Select storage resource type: for S3, EBS, RDS).
  3. Backup vault (Select backup vault (N available):): each vault shows its recovery-point count.
  4. Resource (Select resource to restore (N available):): shows the backup count and latest backup date.
  5. Recovery point (Select a backup to restore (N available for <resource>):): the most recent backup is labelled (Latest).
  6. Confirmation (Start restore job?, defaults to Yes): shown after a review list of Resource Type, Resource Name, Recovery Point and Backup Vault.
RDS adds two prompts before the confirmation: Database instance name: under the heading Configure Restore Settings, then Database port: under Configure Database Port (1 to 65535, default 3306). The name prompt is pre-filled with -n, --name when you passed one, otherwise with the identifier the recovery point was taken from, otherwise with <resource>-restored. It is always editable, and the flag seeds it once: step back from the port prompt and the prompt re-offers what you typed, not the flag.

One-shot restore

For CI/CD and scripting, pass the resource type, the recovery point and --non-interactive:
A one-shot run has no confirmation prompt and no dry run. It starts the restore job as soon as the recovery point validates. Agent mode is the exception: --agent previews the restore as a dry run and reports Dry-run — pass --yes to initiate restore. Add -y to apply it.

What happens

Resource types

S3 bucket

EBS volume

RDS database

Restores an RDS instance or an Aurora cluster.
AWS Backup restores run outside CloudFormation, so the restored database keeps the master password from when the snapshot was taken. It is not reset to the current Secrets Manager value. Reconcile credentials before applications connect: reset the database master password to match the secret, or update the secret to the snapshot-era password. Then run fjall rollout <app> so running containers pick up the reconciled values.

EC2 instance

Finding recovery points

Two ways to get an ARN:
  1. AWS Console: Backup, then Protected resources, then select a resource.
  2. AWS CLI, through Fjall-minted credentials:
The interactive picker finds them for you, vault by vault, so you rarely need to look one up by hand.

After a restore

  1. Track the job with the console link the CLI prints, or in AWS Console, Backup, Jobs.
  2. Reconcile database credentials (RDS only). The restored database keeps the snapshot-era master password, not the current Secrets Manager value. Restart services afterwards with fjall rollout <app>.
  3. Update application configuration if the restored resource has a new name or endpoint.
  4. Adopt the resource into an application with fjall import.
fjall import adopts existing AWS resources into a Fjall application, but adoption is currently S3-only. Discovery spans S3, Lambda, ECS, RDS, EC2, ElastiCache and VPC, while anything other than an S3 bucket is refused with UNSUPPORTED_RESOURCE_TYPE. Track restored EBS volumes, RDS databases and EC2 instances manually for now.

Troubleshooting

Permission denied

Grant the IAM permissions listed in Required permissions to the role Fjall assumes for the target account.

—name applies to rds restores only

Drop -n, --name. Only RDS restores carry a caller-chosen name; the other three types are named by AWS Backup from the recovery point, and the flag is refused rather than accepted and ignored.

Failed to get restore metadata

Fjall reads the recovery point’s restore metadata from the Default vault unless told otherwise, and the message names the vault it looked in. Pass --backup-vault <name> naming the vault the recovery point actually lives in — fjall aws exec --target <target> -- aws backup list-backup-vaults lists them. If you already passed --backup-vault the message says so, and the vault named is the one to check.

No restore metadata

The vault answered, and had nothing to say about that recovery point — usually an ARN from another vault, or a recovery point that has not finished. Check the ARN names a COMPLETED point in the vault you passed.

Recovery point not found

Confirm the ARN is valid and the recovery point still exists:

Recovery point ARN is required

You reached the one-shot path without an ARN. Either supply --recovery-point, or drop --non-interactive and use the picker on a real terminal. CI shells hit this whenever stdout is redirected.

Restore job failed

The CLI reports only that the job started. AWS Backup owns the outcome:
  1. Open AWS Console, Backup, Jobs.
  2. Find the failed job by its ID.
  3. Read the status message for the failure reason.

Required permissions

backup:GetRecoveryPointRestoreMetadata is read on every restore: AWS Backup will not start a restore job without the parameters the backup was taken with, so Fjall reads them from the recovery point when you have not supplied them yourself. ListBackupVaults and ListRecoveryPointsByBackupVault are what the interactive picker browses. Fjall defaults the restore role to arn:aws:iam::<account-id>:role/service-role/AWSBackupDefaultServiceRole.

Next Steps

fjall import

Adopt a restored S3 bucket into a Fjall application.

fjall rollout

Restart services after reconciling restored database credentials.

fjall tunnel

Open a secure tunnel to a restored database.

fjall connect

Connect an AWS account before restoring its resources.