Hacker News new | ask | show | jobs
by BFLpL0QNek 1267 days ago
I was looking at LiteFS docs yesterday as it happens.

Does it support snapshots?

From what I could work out, when you start a non primary instance it catches up from the primary? So if your replica is a fresh instance it replicates the entire db from the primary?

I was wondering if it’s possible to snapshot somehow, so if I have a fresh server that comes online it grabs the last known snapshot from somewhere like s3 then the delta changeset from the primary is much smaller (less load?)

1 comments

> Does it support snapshots?

We'll be adding an "export" feature soon to do snapshots. We'll also be adding support for streaming backups similar to what Litestream does (although it'll be cluster aware).

> From what I could work out, when you start a non primary instance it catches up from the primary? So if your replica is a fresh instance it replicates the entire db from the primary?

Yes, it'll grab a snapshot from the primary if it's a fresh instance or if it's been too long since it was connected to the primary (and the next transaction files are not available).

> I was wondering if it’s possible to snapshot somehow, so if I have a fresh server that comes online it grabs the last known snapshot from somewhere like s3 then the delta changeset from the primary is much smaller (less load?)

You could but I'm not sure there's a large benefit over simply copying from the primary. I suppose if you have a very large database and there's only a small number of changes then pulling from S3 first could be beneficial.

The transaction files are also compactable so we'll be able to reduce the total amount transferred once we integrate that into LiteFS.