let fmdate = new Date("11 May 2019 00:00:01 UTC");
let todate = new Date("11 May 2019 23:59:59 UTC");
backup({
uri: "mongodb://demoroot:demopass@localhost:27017/dbDemo",
root: `${__dirname}/bkp/`,
parser: "bson", //use only bson to get same mongo format
collections: ["tblBook"],
callback: (err, data)=>{
console.log(err);
console.log(this)
console.log(data);
},
query: {
publisedDate: {
$gte: fmdate,
$lt: todate
}
}
});
Gopal R.