You can add a pre-process script file or a post-process script file for MongoDB on the Kubernetes access nodes.
Example Pre-Process Script
The following example is a pre-process script for MongoDB.
mongo --eval 'db.fsyncLock();'
Example Post-Process Script
The following example is a post-process script for MongoDB.
mongo --eval 'db.fsyncUnlock();'
Output and Log Files
Commvault does not log the return codes of MongoDB pre- and post-scripts. To confirm that the pre/post execution commands are executed, inspect your MongoDB log file: /var/log/mongodb/mongodb.log.
Caution: Backup jobs depend on the return codes of pre- and post-scripts. Any return code value other than 0 fails backup jobs.