Exec command run in meteor server


#1

How i can running exec command in meteor server. here my code’s on meteor server

if(Meteor.isServer()) {
exec = Npm.require('child_process').exec;

exec("mongodump --host localhost --port 27017 --username user --password pass --db mydb --out /home/sakukode/backup");
}

on enviroment develop, this code running well, but in production env (i’m using meteor up) this is not running well. please help