MongoDB Database Backup Script with x509 Authentication
You can customize this Script based on your requirement . If you want to Trigger this Daily Backup with Basic Mongodb Authentication Just Ignore the PEMKEY & CA parameters and make the changes in the AUTH_PARAM
For Example :-
if [
This will help to Enable Daily Backup without SSL Enabled.
Also, you can Alter your Retention Period on:
BACKUP_RETAIN_DAYS=30
GZIP is Enabled along with Mongodump this will compress your backup by default.