Synchronising Disks - New to Cloud

Hey,

Quick:
My volumes dont share data

Long:
I currently have 2 machines, each with 1 volume called litefs.

fly.toml

[mounts]
  source = "litefs"
  destination = "/var/lib/litefs"

litefs.yml

fuse:
  dir: "/litefs"

data:
  dir: "/var/lib/litefs"

Dockerfile

# Install the latest LiteFS binary
COPY --from=flyio/litefs:latest /usr/local/bin/litefs /usr/local/bin/litefs

my application uses a database (/app/database.db) but this is not synchronized over both volumes… I tried for hours and im 100% stuck

If you need any further information to support me please just ask me :slight_smile:

Kind regards
asterisk

I also just have noticed that my data gets whiped after a restart.
I read that / data gets cleaned when restarting but istn there an exception?

I have tried to put the database into /var/lib/litefs where i mount my litefs volume…

Thanks for your help

I think your SQLite database needs to be in /litefs in order to be replicated. In the example config they use /litefs/db.

See the comment about this dir:

It intercepts disk writes to determine transaction boundaries so that those transactions can be saved and shipped to replicas.

That sounds promising to me!

1 Like

Hi @halfer

I have fond the error… I had a code segment that just deleted the old database on startup wich was left over from my local tests

Thanks for your help tho, it helped preventing some other errors

EDIT: nvm

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