I want to take a backup of my userdatas collection every month.
Backup means:
I need to take userdatas data and store it in some backupuserdatas collection. Every 1 month a batch program should run automatically and should store that month of data(documents) in the backupuserdatas collection.
I have used node-cron for running batch programs but I don't know to write a query for backing up my userdatas collection every month.
How can I do this in Node.js, express.js and mongodb?