veeam MongoDB 备份的前后脚本
创建一个 pre.sh 和 post.sh 脚本,在 ubuntu 机器运行 veeam 备份之前和之后运行,将在备份之前关闭 MongoDB 和使用 MongoDB 的 webservice(myservice),并在备份完成后再次启动它。例如:
pre-和-post-script-for-veeam.sh
systemctl stop myservice
systemctl stop mongod
exit 0和
pre_和_post_veeam_post.sh
systemctl start mongod
systemctl start myservice
exit 0I highly recommend proper error h和ling - here h和over error codes from systemctl comm和s.
像这样选择 shell 脚本的路径:

If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow