Importing sqlite db to litefs from local machine

Hello, I think I am missing something obvious here. I have an existing app I was running in AWS utilizing litestream. I would like to transition to using litefs within fly.io to simplify deployment and automatic handling of the primary writer node. I can run and build my app fine on fly.io, but I have been unable to find out how to import a sqlite .db file from my local machine to a litefs cluster I have created on fly.io. Where do I find the URL of my cluster needed for the litefs import command. I can’t find it in the UI and I can’t find any options in the fly CLI related to litefs clusters. It is ~3gb and is too large to be imported via the webui. Any help would be greatly appreciated.

Added litefs

Hi… The Getting Started doc assumes that you are running litefs import on the Fly machine itself, effectively.

(In which case, you don’t need the -url parameter.)

I.e., a person would first upload his existing database to /tmp on the primary machine—and then fly ssh console onto there to do the import. (It would be prudent to turn off auto-scaling ahead of time, as well, :dragon:.)

You can check whether you do have adequate free space via…

fly ssh console -s -C "df -h /tmp"  # select primary

If not, you can probably tunnel its port 20202 through via fly proxy, but I haven’t tried that one myself before.

Hope this helps a little!

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