Restoring a deleted volume

Sometimes you need to restore a deleted volume. Maybe it was accidentally deleted, or the worker failed and we weren’t able to restore it for you.

flyctl v0.2.45: supports the full restore process. Follow the instructions below.

Step by step

  • Get the volume id with: fly vol ls --all
  • Get the snapshot id that you want to restore with: fly vol snapshots ls <volume_id>
  • Create a new volume from that snapshot: fly vol create --snapshot-id <snapshot_id>
  • Use the restored volume as needed!

This was a little trickier before flyctl v0.2.45, because we didn’t have the --all flag on fly vol ls and fly vol snapshots ls didn’t work for deleted volumes.


Some things to know about this process:

  • This only works while the snapshots are retained
  • The default snapshot retention for volumes is 5 days
  • You may configure a longer retention period by specifying --snapshot-retention when creating or updating the volume
  • fly vol ls --all will show volumes that are soft deleted for about one day; it does not show volumes that have been deleted after that even if snapshots remain (we’re working on improving this!)