Error
gabrielapittari opened this issue · 11 comments
Hi,
I'm trying to make a backup, but I'm having the following issue:
$ mongodb_s3_backup -n configDB.json
29 May 10:25:05 - [info] Loading config file (/configDB.json)
29 May 10:25:05 - [info] Starting mongodump of heroku_app31122212
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
Do you have any clue what could be happening?
Thanks
Sounds like the mongodump command errored out for some reason. Can you let me know which version of node you're using?
Also, can you try replacing: https://github.com/theycallmeswift/node-mongodb-s3-backup/blob/master/index.js#L113-115 with
mongodump.on('error', function (data) {
log(data, 'error');
});
Hi,
I'm using node 0.10.13.
Still I replaced the lines, this is the error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
Can you try overriding the spawn method as detailed here? http://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js
Let me know what it prints out.
do I have to run now "node index" from the mogodb-s3-backup folder? how do I compile the changes?
JS doesn't need compilation. You can just edit the file in the node_modules/
directory and run it again.
Then i might be doing something wrong cause it's showing then same error all the time. I override the spawn method.
:(
What operating system are you using?
OsX
Gabriela Pittari
On May 29, 2015, at 6:20 PM, Swift notifications@github.com wrote:
What operating system are you using?
—
Reply to this email directly or view it on GitHub.
Can you push your code to github so I can look at it? Really hard to debug with the amount of info I have
I had the same issue. Solved it by running the script with sudo.
Ah ha! That makes a ton of sense. The issue is the way you have your dependencies installed (they belong to the root user, not you). Closing as this is not a bug with the software, but a bug with your configuration.