Skip to main content
A snapshot is a point-in-time copy of a volume’s data. We automatically take daily snapshots of all Fly Volumes. We store snapshots for 5 days by default, but you can set volume snapshot retention from 1 to 60 days.
If the data stored on your volume updates frequently, then you should have other methods to back up or replicate your data in addition to daily snapshots. If you only have a single copy of your data on a single volume, and the host fails, then any data stored between the time when the snapshot was taken and the time when the failure occurred will be lost.
You can use a volume snapshot to restore the data into a new volume. You can even use the same process to restore data from a deleted volume.

Set or change the snapshot retention period

Snapshot retention is the length of time (in days) that we store a volume snapshot. The default is 5 days. Set snapshot retention when you create a volume:
You can also update the snapshot retention for a volume. The new retention period is applied to new snapshots; it won’t affect existing snapshots. Update snapshot retention for an existing volume:
For Fly Launch apps, you can add snapshot retention to the [mounts] section of your app’s fly.toml file. Any new Fly Volumes fly deploy creates will have the new retention period. This example sets the snapshot retention period to 14 days:

Create a volume snapshot

We automatically take daily snapshots of your volume and keep them for 5 days by default. You can also create a snapshot of a volume on demand:
  1. Run fly volumes list and copy the ID of the volume to create a snapshot from.
  2. Create a snapshot of the volume:
    The snapshot might take a few seconds or longer to complete, depending on the volume size.
  3. List the volume’s snapshots:
    Example output:
The state of the new snapshot will go from waiting to running to created. For options, refer to the fly volumes snapshots docs or run fly volumes snapshots --help.

Restore a volume from a snapshot

The procedure to restore data from a deleted volume is very similar, see Restore a deleted volume. Restore the data from a volume by creating a new volume from a snapshot:
  1. Run fly volumes list and copy the ID of the volume to restore.
  2. List the volume’s snapshots:
    Example output:
  3. Restore data from the volume snapshot into a new volume of equal or greater size:
    Example output:
For options, refer to the fly volumes create docs or run fly volumes create --help.

Create a Machine with a volume from a snapshot

Create the volume and the Machine in one command:
--with-new-volumes creates a new volume instead of reusing an existing one. --from-snapshot populates that volume from the snapshot. The trailing 1 is the Machine count. For options, refer to the fly scale count docs or run fly scale count --help.

List snapshots and their stored sizes

Snapshots for each volume are stored incrementally, so only data that has changed since the previously stored snapshot consumes additional storage. The total stored size of the snapshots is used for Volume Snapshot billing.
  1. Run fly volumes list and copy the ID of the volume.
  2. List the volume’s snapshots:
    Example output:

Disable automatic daily snapshots

Automatic daily snapshots are enabled by default. To disable automatic snapshots, use the --scheduled-snapshots=false flag. Snapshots of encrypted volumes (defaults to true) are likewise encrypted at rest. Disable automatic snapshots when you create a volume:
Disable automatic snapshots for an existing volume:
Disabling automatic snapshots will not remove any existing snapshots for the volume; snapshots are only removed at the end of their retention periods. For Fly Launch apps, you can disable automatic snapshots in the [mounts] section of your app’s fly.toml file. Any new Fly Volumes fly deploy creates will have automatic snapshots disabled: