superfly / litefs

FUSE-based file system for replicating SQLite databases across a cluster of machines
Apache License 2.0
3.95k stars 95 forks source link

Support downloading a snapshot from LiteFS Cloud #392

Open quells opened 1 year ago

quells commented 1 year ago

It would be nice if the litefs CLI could download snapshots from LiteFS Cloud. Nothing fancy - just the latest snapshot as if it were another readonly node coming online. This would allow Fly.io customers to backup their databases to another storage provider.

I've got a super rough POC here pieced together from bits from this repo and the LTX library: https://github.com/quells/litefs-dl

Apologies if I've simply missed something - I couldn't get litefs export to work. Although if I understand correctly, you're supposed to mount and then export? But mount doesn't work on macOS.

benbjohnson commented 1 year ago

Thanks for the suggestion. That makes sense. We should add a CLI export into LiteFS Cloud so you can download a snapshot.

The export command is meant to export from a running LiteFS instance so it only works when it's already mounted.