-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongodump: illegal argument combination: cannot specify --username and --uri #161
Comments
Can you try switching your image to |
the The problem is that we can use either |
Thanks for the headsup on the quotes. Looks like I'm going to need you in #149. Once someone puts in a URI it takes the place of the arguments are you saw above. What arguments are you trying to add in? I've just added the ability to use EXTRA_OPTS with the URI function as well. Let me know if that works, otherwise we'll have to further expand. |
nothing extra (see docker-compose in my original comment) the problem that #149 made is that it's not possible to use The only way I see forward would be to forget about individual arguments and construct a full mongo uri from the provided data. Some important things to watch out for
|
I think what I'll do is build some routines to use the old way unless the custom URI is set. I have a couple other things on the go right now but will get to this in a few days. |
Sorry, I had a health issue which limited my ability to work on this. I'd like to close this down. I just pushed the ability to use EXTRA_OPTS with MONGO_CUSTOM_URI and will review how I am assembling the final URI to see we can get back on track. |
A new version which restores the old functionality of backing up with --host --user etc parameters is now in place. If detected MONGO_CUSTOM_URI - then that will override and use that string along with --uri as a prefix to backup. EXTRA_OPTS functions in both cases as well. Can you let me know how the new :develop works? |
Sorry for the late response. the latest Here is the invalid command it's trying to run. there is an extra Here is a relevant portion of the debug log.
|
Thanks let me fix this immediately and have a new develop in place momentarily. |
Wasn't expecting an answer this quick. Well, rip my PR I guess. Yes, It does work correctly with the quotes removed |
Great. Are you able to test the |
specifying just Other than that everything works fine when using the URI (also tested the MongoDB atlas The host is technically not needed since it's already in the URI but I've seen it's used in other places like the backup file name so I'm not sure how to feel about this. We could keep it as is, and still require the host but just make it clear in the documentation that when using |
I actually should be populating DB_HOST to build the filename. Thanks for this. I'm going to need 5 minutes or so and then I can see whats going on here. |
Oof. I see it now. It would work with a manual backup but not with the container starting. I've shuffled some things around again. One last time if you could for a test? Seems good on my end. |
Looks good to me 👍 |
Summary
Mongo db backup broke
Steps to reproduce
What is the expected correct behavior?
DB Backup of 'mongo_test_mongo_20220929-114619.archive.gz' completed successfully
Relevant logs and/or screenshots
Environment
Any logs | docker-compose.yml
versions 3.4.0 and up are affected, below that works as expected
Possible fixes
use the correct mongodump syntax for the new version
The text was updated successfully, but these errors were encountered: