LiteFS: remove databases

My app’s flow involves creating and removing databases, but I can no longer remove databases from where they are created :sob: . Is it related to LiteFS Cloud?

Yes, it looks like LiteFS Cloud is automatically restoring the database after it’s deleted on the LiteFS side. We’ll get that fixed up.

Regarding deletion, are you expecting that the database is hard deleted on the LiteFS Cloud side immediately or that the data is still recoverable for some period of time (e.g. 30 days)? For non-GDPR use cases, it seems like making the data recoverable is ideal since it can save someone from an accidental delete. However, with GDPR it seems like different expectations may exist.

1 Like

I’m deleting cloned databases from another database, so it is okay to hard delete them for this specific case. As you said, it is probably better to have soft delete for most cases.

@benbjohnson do you have any updates on this topic?

The change is going to require a bit of rework in how we drop databases within LiteFS. Currently with LiteFS, the deletion is propagated to other LiteFS nodes by sending a frame in the replication stream to drop the database and that works well.

However, with LiteFS Cloud, the cloud service acts as the data authority so we are reworking the backup stream so that the underlying replication files can indicate deletion by using a zero-length database file. That’ll let us safely do soft deletes.

That’s a long explanation to say that unfortunately it’s not a simple fix but we hope to have something working soon.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.