when trying to use litestream with a litefs hosted database you get operation not permitted errors
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
I too am running into this issue, if @rkrdeano's PR fits the bill, I think it would solve my issue as well!
@benbjohnson I have a same issue.
#611
I hope to solve this problem.
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!
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.