Possible to restore deleted volume from snapshot?

Hi all,

I just deleted the app dark-silence-8312. I did not expect this to delete the associated persistent volume.

I know that there was a snapshot of the volume taken a few days ago, because I listed it shortly beforehand using fly volumes snapshots list vol_ke628r68kxd4wmnp.

Is there any chance that volume can be recovered/restored?

Thanks in advance!

Here’s the snapshot id in case it makes it any easier!

ID                      SIZE            CREATED AT
vs_41RD9ozen8zOASk3     37558421        3 days ago

Just bumping this as the week starts, in the hope that it might be recoverable for the next day or two…

Yeah I’m almost sure there is a flag to create a volume from a snapshot.

Found it, --snapshot-id. Reference:

There is, however the volume itself was deleted when the app was deleted, so now that command doesn’t work.

I foolishly assumed that either:

  1. The volume would not be deleted alongside the app (seems much safer to not cascade delete)
  2. Even if it was, the snapshot would still be available to restore.

This isn’t critical, or I’d have my own backup, just a bit frustrating.

Does this command exits with an error?

fly volumes create restoretest01 --snapshot-id <snapshot-id> 

Note: you don’t restore a volume, you create a new one from a snapshot. So I don’t see why it is not working.

Yes, it exits with:

Error failed creating volume: Could not find VolumeSnapshot

To additionally clarify: I also cannot list the snapshots from the original volume. The only reason I have the snapshot id is that I listed it before deleting the app.

 ❯❯❯ fly volumes snapshots list vol_ke628r68kxd4wmnp
Error failed retrieving snapshots: Could not find Volume

Unfortunately, there’s no way to recover snapshots from deleted volumes. We have some big volume improvements planned, and this will likely be something we solve. I know that doesn’t help you now, but it’s definitely something we want you to be able to do.


Understood, thanks for letting me know.

1 Like

This is unexpected. For now, I think it deserves a warning on both flyctl and documentation. The only issue is that it’s not clear right now that snapshots depend on the volume that created them.

1 Like