# Backups and restore

Preserve a consistent stopped store, configuration, packages and authoring source.

The Aion CLI has no backup or restore subcommand. Use a stopped-writer filesystem backup of the complete durable store. Preserve the configuration and code needed to reopen its histories.

## Decide what is being preserved

The durable data directory contains workflow histories and persisted server records. Back up the entire directory, including its metadata.

Keep the active config, binary identity and package archives with the backup record. Keep the authoring workspace and source repository separately when they live outside the data directory. Harness login state is owned by that harness and has its own backup policy.

## Take a consistent copy

Arrange a maintenance window. Stop the writer through the verified local control path and confirm it has exited. Ensure no other writer has opened that data directory before copying it with your filesystem backup tool.

Keep owner-only permissions and the directory structure. Copy the store after its writer has exited so the files remain consistent throughout the copy.

A cluster backup plan must cover every owned shard and the full membership. Record which copies preserve each shard.

## Restore in isolation

Restore to a separate private directory with no process writing to it. Use the binary and config for the recorded store layout. Point a separate evaluation configuration at the restored copy, with distinct listener addresses and a distinct home.

Verify build identity, loaded routes, representative histories, timers and worker requirements before switching any production traffic. Run a restore exercise against the copied data.

## Package and schema retention

A run pins a package version. Preserve the archives that live or reopenable runs require. Keep imported schemas and source when you need to regenerate packages or render their documentation.
