Running MongoDump from C-Sharp Program in Linux Docker Container
Dear community,
I am trying to write a Docker container that will automatically back up all my MongoDB data that's on another server. It should run mongodump on my MongoDb database (
dbName
) and then storing the archive as the designated file (mongoDumpPath
).
When I try to run this in C#, noting happens, (i.e. I can't see the archive file, the result
string is empty). However, when I copy and paste the mongoDumpCommand
string variable and paste it onto the bash shell of the container, it works perfectly.
Can you please advise? Thanks kindly!
EDIT: The StandardError output shows an "unable to execute binary file" even though chmod +x /usr/bin/mongodump
is in the Dockerfile.0 Replies