litestream icon indicating copy to clipboard operation
litestream copied to clipboard

when trying to use litestream with a litefs hosted database you get operation not permitted errors

Open rkrdeano opened this issue 1 year ago • 3 comments

Hi,

I am trying to use litestream from inside my app, it works great locally, but when I run it on fly with litefs it tries to write the metapath to the same directory as the database.

This is not permitted by litefs as it says it only supports a flat directory structure.

Would it be ok if I forked the repo and added a pull request with a new NewDB function called NewLFSDB func that took an alternative path for the metadata?

I think that would solve the problem.

Thanks

rkrdeano avatar Oct 12 '24 10:10 rkrdeano

I too am running into this issue, if @rkrdeano's PR fits the bill, I think it would solve my issue as well!

Waffleophagus avatar Jan 01 '25 17:01 Waffleophagus

@benbjohnson I have a same issue.

#611

I hope to solve this problem.

edegp avatar Feb 02 '25 13:02 edegp

This issue has been inactive for 90 days and will be automatically closed in 30 days if there is no further activity. If this issue is still relevant, please add a comment to keep it open. Thank you for your contribution!

github-actions[bot] avatar Oct 30 '25 20:10 github-actions[bot]

Closing this issue as the functionality now exists via the meta-path configuration option.

You can configure Litestream to store its metadata in a different directory, outside the LiteFS-managed filesystem:

dbs:
  - path: /litefs/db.sqlite
    meta-path: /tmp/litestream-meta  # Store metadata outside LiteFS
    replicas:
      - url: s3://bucket/backup

This allows Litestream to work with databases on filesystems that don't support subdirectories or have other restrictions.

If you're still experiencing issues with this configuration on a recent version of Litestream (v0.5.x), please open a new issue with details about your setup and we'll investigate.

corylanou avatar Dec 20 '25 19:12 corylanou