SQLite file in Volume lost data on deploy

Hello,

I’m brand new to fly.io.

I tried it because I heard you guys were trying to embrace SQLite.

I had a deployment with a SQLite file in a volume.

I just attempted to to run fly deploy to update this app. The deploy failed, and the SQLite file seemed to revert to its initial state when I first deployed. I had added about 200 rows to the database since deploying it, and those all disappeared.

Is there any way to get this data back? This isn’t catastrophic but I’d like the data back …

Thanks

1 Like

I just noticed there are snapshots.

Any idea how I can download one? This would prevent me from losing my work …

I think that the sqlite file may have been actually in my app directory and not on the volume. And it just got blown away by the deploy :confused:

Ah. If so, that would explain it. The volume is independent of the app and that would persist across deploys.

As you’ve seen, Fly also take snapshots of volumes and they can manually restore them (see thread below). But if your database was not on that volume, I guess that won’t be much help here :frowning:

1 Like

How can I manually restore snapshots? That thread doesn’t say how. And I can’t find any documentation about restoring snapshots anywhere …

@justin678 As far as I know you can’t, yet. The key part from Kurt’s post above is the “We can restore that …”. So it needs someone from Fly. If you have a paid plan that would include access to their support to ask for assistance, else it will be a case of someone from Fly seeing your post. They do regularly check and update this forum.

Ahh. Well the relevant snapshots have been deleted now so we’ll never know if that was actually the problem :confused:

As of flyctl version 0.0.363 (released yesterday) you can specify a snapshot-id when creating a new volume. One caveat is that cross-org restores are not currently allowed.

Hi @justin678 – We really let you down on this and I’m sorry. It doesn’t make up for the data, but I’ve put some credit on your account to try to make up for it.

As @jphenow noted, we’ve updated flyctl so that you can create a new volume using an existing snapshot. As long as you are working in the same organization, this will help if this comes up again.

Thanks @michele and @jphenow. Look forward to future SQLite improvements!