Restore backup material

Description

Use restore workflows to recover Stream Offline CA state from single artifacts or self-contained backup bundles. For appliance boot and workflow selection, see Restore an existing Stream Offline CA appliance.

Verify the backup identifier, CA identity, metadata, license source, and HSM state before applying a restore.

Restore input media can be USB keys or USB disks. The appliance mounts the selected media, stages restore inputs locally, verifies staged file size and SHA-256 hash, then unmounts the media when the workflow no longer needs it. The restore workflow must not modify backup files in place on removable media.

When Stream is already running on the appliance, RESTORE is also available from the main appliance console, next to BACKUP. Use this entry when a restore must be launched after the appliance has already reached the post-start menu.

Post-start appliance menu with RESTORE action

Restore workflow

Opening RESTORE displays the restore action menu. Choose RESTORE to run the restore wizard, or INSPECT to read one backup or metadata file without changing the runtime.

Restore action menu

The restore wizard then asks whether the operator wants to restore a single artifact or a bundle.

Restore wizard type selection
  • Single restore

  • Bundle restore

  1. Prepare the runtime.

  2. Boot the approved Live USB.

  3. Select Restore.

  4. Install required HSM middleware when the restored CA uses an HSM.

  5. Select and apply the artifact.

  6. Open RESTORE.

  7. Choose SINGLE.

  8. Select the configuration, database, or license artifact.

  9. Review the restore summary.

  10. Apply the restore.

  11. Validate the restored state.

  12. Wait for Stream Offline CA to restart Stream and synchronize runtime settings.

  13. Validate Stream UI, CA objects, keystores, license, and exported files.

  14. Run a fresh backup before shutdown if the restore was followed by any operation.

  1. Prepare the runtime.

  2. Boot the approved Live USB.

  3. Select Restore.

  4. Install required HSM middleware when the restored CA uses an HSM.

  5. Select and validate the bundle.

  6. Open RESTORE.

  7. Choose BUNDLE.

  8. Select the bundle archive. Plain and password bundles use .tar.gz; Shamir bundles use .enc.

    Bundle backup file selection
  9. Select the matching .metadata.json file when it is not found automatically next to the archive.

  10. For protected bundles, make sure the .metadata.json.hmac sidecar is present with the metadata. When metadata is selected from USB media, the appliance stages the metadata and its .metadata.json.hmac sidecar together before validation.

  11. When the bundle is Shamir-protected, select the required share files.

    Shamir-protected restore information

If the metadata indicates per-share password protection, enter the password associated with each selected share when prompted. The appliance verifies the encrypted share hash before asking for the password, then checks the decrypted share content before counting it toward the threshold. The verifier is recalculated from the metadata password_kdf, password_salt, and password_cost before decryption. A wrong password rejects that share and asks for another selection; it does not start the restore and it does not count toward the threshold. A lost password cannot be recovered from its verifier.

  1. When the backup contains a license, let the appliance validate it or select a replacement license when validation requires it.

  2. Apply and validate.

  3. Review the restore summary and file characteristics.

  4. Apply the restore.

  5. Wait for Stream Offline CA to restart Stream, recover runtime settings, synchronize credentials, and update the kiosk context.

  6. Validate Stream UI, CA objects, keystores, license, and exported files.

  7. Run a fresh backup before shutdown if the restore was followed by any operation.

Supported restore inputs

Workflow Input Expected companion files Primary validation

RESTORE > SINGLE > CONFIG

stream-configuration-*.tar.gz

Optional administrator-password recovery sidecar generated with the same timestamp.

  • Filename pattern

  • Archive structure

  • Pre-apply snapshot

  • Restore binary availability

RESTORE > SINGLE > DATABASE

stream-db-*.gz

Optional administrator-password recovery sidecar generated with the same timestamp.

  • Filename pattern

  • Database backup structure

  • Pre-apply snapshot

  • Restore binary availability

RESTORE > SINGLE > LICENSE

stream-license-*.lic

None required.

  • Readable file

  • Non-empty file

  • .lic content validation with license-check.sh

RESTORE > BUNDLE

backup-bundle-*.tar.gz or backup-bundle-*.enc

  • Matching .metadata.json

  • Protected bundles also require the .metadata.json.hmac sidecar

  • Shamir bundles require the approved threshold of share files

  • Metadata parsing

  • Metadata/archive match

  • Archive hash

  • Payload hashes

  • Protection-specific authentication

  • Pre-apply snapshot

RESTORE > INSPECT

  • .metadata.json

  • .enc

  • .tar.gz

  • .zip

  • .gz

  • .lic

Optional matching metadata when available.

Read-only inspection. No runtime change is applied.

Restore validation sequence

Restore is a gated workflow. The appliance stops before changing Stream runtime state unless every gate passes.

Gate Appliance check Stop if

Stage input files

Copies USB-selected files to local restore staging and compares size plus SHA-256 hash. For bundle metadata selected from USB media, the matching HMAC sidecar is staged with the metadata when present.

Staging fails or a staged hash differs.

Match restore type

Checks SINGLE filename patterns and BUNDLE archive type: .tar.gz or .enc.

The selected file does not match the chosen restore mode.

Trust metadata

Confirms metadata format, selected archive name, and archive hash.

Metadata is missing, mismatched, or points to another archive.

Unlock protection

  • Verifies password/HMAC material, or reconstructs the Shamir secret

  • Requests and validates the password verifier for each protected Shamir share

  • Decrypts the archive

  • Checks the decrypted hash

  • Authentication fails

  • Share reconstruction fails

  • Decrypt fails

  • Hash validation fails

Resolve payloads

  • Extracts only relative regular files and directories into private staging

  • Rejects path escapes, links, duplicate members, and special files

  • Does not restore archive ownership or permissions

  • Verifies payload hashes

  • Identifies configuration, database, encrypted Stream archive, and license files

An archive member is unsafe, a payload hash fails, or a naming fallback cannot be reconciled with the recovery kit.

Validate license

Validates bundled or replacement license material when restore includes a license.

No valid license is available and the workflow does not explicitly allow skipping license restore.

Confirm pre-apply state

Writes the restore snapshot and verifies restore tools, license checks, and staging directory readiness.

Snapshot creation or the final pre-apply gate fails.

Apply after review

Stops stream.service, then applies configuration, database, and license material only after operator confirmation.

The service cannot be stopped, or

Any item differs from the recovery kit:

  • Selected file

  • Hash

  • CA identity

  • License

  • HSM state

Restore integrity checklist

Check Expected result

Media handling

The backup media was mounted only for selection or staging, and unmounted before removal. No backup file was edited in place on removable media. Hidden or internal paths, dotfiles, .DS_Store, .Trash-*, symlinks, and path escapes were not used as restore inputs.

Archive and metadata

The following all refer to the same backup set:

  • Archive filename

  • Metadata filename

  • Archive SHA-256

  • Payload SHA-256 values

  • Protection mode

  • Recovery kit

License

Any restored or replacement license:

  • Is readable

  • Is non-empty

  • Has a .lic extension

  • Passes license-check.sh

Shamir shares

For Shamir bundles, each selected share:

  • Matches metadata

  • Has a unique SHA-256 hash

  • Is counted once

Pre-apply state

The pre-apply snapshot was written and the pre-apply gate passed before the operator selected Apply.

Post-restore state

The restored state matches the recovery kit and operation report:

  • Stream UI

  • CA identity

  • Keystore type

  • License status

  • Exported public material

  • HSM access

Consistency checks

After restore, confirm that:

  • The restored version and intended CA identity match the recovery kit

  • The Stream database and configuration belong to the same backup set

  • The license is valid

  • The expected keystore type is present

  • HSM-backed keys are accessible only after the HSM is connected and authenticated

  • Generated ARL/CRL and certificate downloads match the expected CA state

  • No unexpected USB media remains mounted.

Do not resume CA operations from a restored appliance until these checks have passed.

Information to protect

Never store the following in an unprotected report, ticket, chat, or public documentation:

  • Real PINs

  • Real passwords

  • Private keys

  • Shamir share values

  • HSM authentication secrets

  • Stream administrator password values

  • Unencrypted backup archives containing private-key material.