Applies to: On-premises access nodes only
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.
# cat /opt/commvault/Base/kscripts/cluster_name/mynamespace.myapplication.prescript
mongo --eval 'db.fsyncLock();'
Example Post-Process Script
The following example is a post-process script for MongoDB.
# cat /opt/commvault/Base/kscripts/cluster_name/mynamespace.myapplication.postscript
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: Commvault does not log the return codes of pre- and post-scripts on the access node. For the location of pre- and post-script output on your containerized application pod, refer to per-application implementations.