Migrate between devices
For an application’s data to follow it between devices you own, the data has to live in
platform-managed storage declared mobility: movable. A host bind mount (./data:/data, or
a Compose named volume) is tied to the machine it was created on: the platform can’t quiesce,
snapshot and restore it elsewhere.
The simplest way is to declare the storage when you first deploy, whether you deploy with
edgible stack deploy or an AI assistant deploys for you through the Edgible MCP server. If the
application is already running on a host bind mount, see
An application already on a host bind mount.
What needs to be true
Section titled “What needs to be true”- The volume is declared in
spec.storage[]withmobility: movable. Volumes default toimmovable, so setmovableexplicitly. - The workload mounts the volume Edgible provides, not a path of its own. A compose file
mounts it as
${EDGIBLE_STORAGE_<NAME>}. - Both serving devices are online and run agent 1.4.9 or later.
Declare movable storage at deploy
Section titled “Declare movable storage at deploy”Declare the volume in spec.storage[] and reference it from the workload. Save as app.yml:
apiVersion: v3kind: Applicationmetadata: name: migration-app organization: <your-org-id>spec: storage: - name: data type: persistent size: 1Gi mobility: movable workloads: - name: web type: compose composeFile: ./docker-compose.yml ports: - { name: http, containerPort: 8080, protocol: tcp } storage: - name: data mountPath: /data access: - name: public type: https target: { workload: web, port: http } hostname: { generated: true } tls: { managedBy: edgible } policies: { auth: { modes: [none] } }Mount the volume in the compose file through its variable:
services: web: image: ghcr.io/your-org/your-app:latest ports: - "127.0.0.1:8080:8080" volumes: - ${EDGIBLE_STORAGE_DATA}:/dataThe agent creates the volume on the device and sets EDGIBLE_STORAGE_DATA to its path when it
runs Compose. The variable is the storage name uppercased, with hyphens turned into underscores:
app-data becomes ${EDGIBLE_STORAGE_APP_DATA}. Use the same container path as the workload’s
mountPath. A compose file that binds a path of its own instead (./data:/data) keeps the data
on the device, whatever spec.storage[] says.
edgible stack deploy embeds the compose file in the declaration (composeFile: base64:<yaml>), and an AI assistant writes it there directly. Either way the
${EDGIBLE_STORAGE_DATA} line goes in the compose content.
Deploy:
edgible stack deploy -f app.ymlSee the Application YAML reference for the other mobility values.
Move the application
Section titled “Move the application”Move it to another of your serving devices, carrying the movable volume:
edgible application move <app> --to <device> --storage dataThe platform stops the application, snapshots the volume, ships it to the new device, restores it there and starts the application on it. The hostname stays the same. The old device keeps its copy of the data, so you can move back.
A move carries one volume. It never leaves data behind silently: if the application has storage
the move doesn’t carry (a compose bind mount or volume included, declared or not), the move is
refused with MOVE_WOULD_LOSE_DATA, names each volume,
and changes nothing. Make the volume movable and name it with --storage, or accept the loss
with --stateless: the application starts on the new device without that data, and the old
device keeps its copy.
edgible application move <app> --to <device> --statelessAn application already on a host bind mount
Section titled “An application already on a host bind mount”Data written to a host path stays on that device until it is copied into platform-managed storage. Change the declaration, then copy the data in:
-
Find the volume.
storage listshows each host-bind volume and its path as the compose file wrote it:Terminal window edgible application storage list --app <app> -
Declare the volume in
spec.storage[]withmobility: movable, and change the compose volume line from the host path to${EDGIBLE_STORAGE_<NAME>}, as in Declare movable storage at deploy. Redeploy.edgible application storage declare --app <app>printsspec.storage[]entries to start from; it doesn’t change the declaration itself. -
Copy the data in. The new volume starts empty, and the old host directory is still on the device. Push a copy of it into the volume, stopping the workload while it applies:
Terminal window edgible application storage push --app <app> --storage-name data --path ./old-data --quiesceRun this wherever the data is. On the device itself,
--pathcan be the old host directory. -
Move with
--storage, as above.
Why not storage promote?
Section titled “Why not storage promote?”edgible application storage promote copies a host-bind volume into platform-managed storage on
the device and rewrites the compose file’s mount there. It only works when the declaration names
a compose file by its path on the device. edgible stack deploy, edgible application create
and AI assistants embed the compose file in the declaration instead (composeFile: base64:<yaml>), and the device writes that file again from the declaration on every deploy, so
promote refuses those applications with
STORAGE_PROMOTE_UNSUPPORTED before it stops
anything. Change the declaration as above instead.
Push data into a volume
Section titled “Push data into a volume”storage push ships local data into a volume on the application’s device: to seed a new volume
from a backup, load a dataset, or copy in data from a host bind mount:
edgible application storage push --app <app> --storage-name data --path ./seed-dataBy default the CLI packs --path with tar before shipping. Useful options:
| Option | What it does |
|---|---|
-p, --path <path> | Local file or directory to push. |
--no-pack | Treat --path as a pre-built tarball; don’t pack it. |
--quiesce | Stop the workload across the apply step. Recommended for stateful apps so nothing writes mid-copy. |
--apply-mode <mode> | replace (default) swaps the volume contents; merge overlays the pushed data on top of what’s there. |
--device-id <id> | Target a specific device (defaults to the application’s first device). |
Verify
Section titled “Verify”List the application’s storage records to confirm the volume is platform-managed and movable:
edgible application storage list --app <app>Add --json for machine-readable output.
Once the workload is running against the volume, confirm the app itself is healthy: read its live
output with edgible application logs
and check that its hostname’s certificate is still issued with
edgible certs.
Limits
Section titled “Limits”- VM workloads need a storage-mounted disk. Inline
diskImagepaths can’t move; declare the disk viaspec.storage[]and reference it from the workload’sstorage[]. - Host bind mounts don’t move. A move refuses to leave one behind unless you pass
--stateless; redeploy with a declared volume to carry it. - Promote needs a compose file named by its path on the device. An embedded compose file is refused; declare the volume in the declaration instead.
- The serving device must be online for declare, promote and push.