You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I've specified a -config file but litestream is not using it, I'd like litestream to error out or print a warning.
It'd also be handy if litestream allowed me to specify a db, and then if there's only one replica URL in my config file, it just uses that one, so I could say:
Yeah, that is not a great behavior. I'll have it error out if a config is specified but not used.
I'm a little hesitant about overloading the CLI args. Right now I see two use cases—one where someone is new to Litestream and just wants to try it out with a DB & replica URL and another where someone sets up a config and runs in production.
This issue is fixed with #94. I added tests for all the commands in a runbook to verify they all work correctly. I can reopen the issue if you have any problems.
Example command
litestream replicate -config /home/mike/litestream.yml "${PWD}/data/store.db" s3://scratch.tinypilotkvm.com/db
For the command above, litestream silently ignores the
-config
flag, which caught me by surprise. The issue seems to be here:https://github.com/benbjohnson/litestream/blob/f652186adf7470256b6a7bf7e96194dde49c2af2/cmd/litestream/replicate.go#L43L61
It only reads the config flag if it's the only argument, like:
Desired behavior
If I've specified a
-config
file but litestream is not using it, I'd like litestream to error out or print a warning.It'd also be handy if litestream allowed me to specify a db, and then if there's only one replica URL in my config file, it just uses that one, so I could say:
litestream replicate -config /home/mike/litestream.yml "${PWD}/data/store.db"
And then if my config file had an entry for
store.db
, litestream just picks the first replica URL.The text was updated successfully, but these errors were encountered: