Device Exit & Restore
Device exit replaces Admiral on the device's whole disk. For a device onboarded from Linux with capture, restore rebuilds the previous system from its saved capture and restore kit, optionally keeping changes made while it ran under Admiral. An image exit instead writes a disk image you provide.
Onboarding restore is in private beta and is not a production-deployed migration service. Arrange access with Admiral and use the supplied preview CLI and a compatible device build. Keep a tested off-device backup and physical recovery media. A restore kit on the same disk is not an independent backup.
The plan is read-only. --restore is not: it arms the operation, stops normal operation through the exit workflow, and stages a restore before the final typed confirmation. The write recreates partitions and filesystems. Once writing starts, it cannot be cancelled; an interrupted or failed write can leave the device unbootable and require physical recovery.
Choose the Source of the Restored OS
--restoreuses the retainedpre-admiralwritable filesystem, including changes made while it ran under Admiral, and reverses capture-specific adjustments using the kit. This is the usual choice when keeping application or database changes.--restore --freshuses the original captured image instead. Changes made to the pre-admiral writable filesystem are discarded. This is not a factory image or a backup of excluded data.
Admiral workload volumes are a separate choice: they are carried according to the mapping plan in either mode. --fresh does not implicitly skip them. Secret files are carried only when you explicitly request a destination with --secrets.
A device installed with capture off has no previous OS kit to restore. Use a separately backed-up image or reinstall from recovery media instead. Do not delete or wipe the captured images and restore kit while you still need this exit path.
Preview the Plan
Run these commands from your operator workstation using the supplied CLI, authenticated to the organisation that owns the device. Replace edge-1 with your device's name or ID.
admrl device exit edge-1 --plan
The device inspects its retained OS and volumes; a large tree can take around a minute to walk. Review the source OS, disk and partition layout, volume destinations, capacity checks, warnings and problems. A plan with problems is refused. The plan is a point-in-time check, not a reservation of disk space or a guarantee against later failure.
Stop application writers cleanly before the real operation and take a final independent backup. In particular, shut down databases and containers inside pre-admiral so their stores are consistent when staged. Do not assume staging supplies an application-consistent snapshot.
Map Workload Volumes and Secrets
By default, all Admiral workload volumes are carried to:
/var/lib/admiral-volumes/<set>/<name>
These are Admiral-managed workload volumes, not a second copy of Docker named volumes already stored inside the captured system. Data in a captured Docker store follows the OS source choice: current with normal restore, original capture with --fresh.
Use the volume identifiers reported by the plan:
| Option | Effect |
|---|---|
--volume shop/db-data=/var/lib/postgresql | Places this volume at the given absolute path in the restored OS. |
--volume shop/cache=skip | Deliberately omits this volume. Back it up separately if needed. |
--volumes none | Omits all volumes not explicitly mapped. The default is all. |
--volume-mode shop/db-data=replace | Moves the existing destination aside as <dest>.pre-restore, then places the volume at the destination. Both copies require space. |
--volume-mode shop/db-data=merge | Merges the volume into an existing destination; conflicting paths can be overwritten. This is not an application-aware database merge. |
--secrets /root/restored-secrets | Also carries the device's secret files to that destination. Treat the result as sensitive plaintext on the restored system. |
An existing destination requires an explicit replace or merge choice. Preview the exact mapping before arming:
admrl device exit edge-1 --plan \
--volume shop/db-data=/var/lib/postgresql \
--volume-mode shop/db-data=replace
For a reusable mapping, generate a template from the device rather than writing guessed fields:
admrl device exit edge-1 --plan-template > plan.yaml
Edit the generated file and preview it:
admrl device exit edge-1 --plan=plan.yaml
A plan file carries the whole mapping; do not combine it with the individual mapping flags. Store it securely if it describes sensitive paths. Recheck the source and volume choices, especially before choosing fresh or skipping data.
Stage, Confirm and Restore
To restore with current pre-admiral changes and the default volume mappings:
admrl device exit edge-1 --restore
Or use the reviewed mapping file:
admrl device exit edge-1 --restore --plan plan.yaml
To deliberately discard changes in the pre-admiral writable filesystem while still using the selected volume mappings:
admrl device exit edge-1 --restore --fresh
The CLI prints the plan again, arms the restore and follows staging. After the restore stream is staged and verified, it asks you to type the device name before writing. Avoid --yes during the private beta: it skips confirmations, including the final erase prompt.
The device then recreates the recorded disk layout, formats supported filesystems, writes the OS and selected data, restores saved boot material and restarts into the restored OS. A successful exit removes the device from Admiral and deletes its Admiral identity and escrowed recovery key. Verify the restored boot, application services, database contents and any carried volumes locally before considering recovery complete.
Detach, Inspect or Abort
Ctrl-C only stops following the operation. It does not cancel it. Inspect the state before taking another action:
admrl device exit edge-1 --status
Before the write starts, you can request cancellation:
admrl device exit edge-1 --abort
Do not treat abort as an undo button. If the device reports abort_requires_reformat, staging has used space from the workload volume: aborting reformats that volume on the next normal Admiral boot and redeploys workloads with empty data. Review the CLI's warning and keep your independent backup. Once the write starts, abort is no longer available.
A staged operation can be confirmed with --confirm; after a verification failure, --retry requests staging again. Recheck status and the failure reason first. Once a successful exit removes the device, its old Admiral record is no longer available for status queries.
Restore Limitations
- Not a sector clone. Restore recreates files and supported filesystem identities, not identical disk bytes, allocation patterns, free space, filesystem history or snapshots. Staging can require adjusted partition sizes; capacity and inode checks must pass.
- Direct partitions only. The supported filesystem reconstruction set is ext4, XFS, VFAT and swap. LUKS, LVM, RAID, Btrfs and ZFS reconstruction is not supported. Unknown, unmounted or explicitly excluded partition contents are not recovered just because the partition table was saved.
- Metadata has boundaries. The file-level path carries numeric ownership, modes, modification times, symlinks, hard links and supported extended attributes, including ACL and file-capability attributes. Hard links that would span restored filesystems become independent copies. VFAT cannot preserve Unix ownership, permissions or extended attributes. Sockets and transient runtime state are not restored as running objects. Do not assume inode flags, creation times, sparse layout or all filesystem-specific metadata survive.
- Firmware is not cloned. The kit saves EFI System Partition files and relevant boot entries/order, not all firmware settings or arbitrary EFI variables. Restoring boot entries depends on writable firmware variable access. This is not firmware rollback or a guarantee that different hardware will boot the result.
- The private beta's platform limits still apply. This is the x86_64 UEFI, Secure Boot-off, 512-byte-logical-sector onboarding path, not a general ARM or legacy BIOS migration tool.
- Only captured data can return. Neither normal restore nor
--freshrecovers explicit exclusions, omitted remote data or data lost before capture. Changes in unrelated workload writable filesystems are not substitutes for explicitly mapped durable volumes. Capture adjustments are reversed, and some system identity files (including hostname and hosts) use the captured copy rather than later workload edits; do not interpret “keep changes” as an exact copy of every workload file.
Exit Using Your Own Disk Image
For a device without a capture kit, or when you want a different OS, admrl device exit also accepts --image with --sha256. The checksum must match the file as served, including compression. Raw, gzip, zstd and xz images are accepted. This path writes from the beginning of the whole disk and does not carry the captured OS or workload volumes as a restore does. Back up and export all required data first, and arrange a supervised exit with Admiral. See admrl device exit --help from your supplied build for the complete image-exit flags.