Script that automates MongoDB back-up and restore

Dear Gurus,

Please see that we have two MongoDB subscriptions.

  1. Testing Subscription (Account)
  2. Production Subscription (Account)

We need to take the backup of Production Subscription mongodb and restore it on Testing subscription (account) for which mongodb said it is not possible BUT YES, we can do it from shell script that automate Mongodb Back-up and restore.

We need your kind support if you can help us how can we write that script.

BRs
Malik Adeel Imtiaz

Can some one please help me in this regard.