veeam MongoDB 备份的前后脚本

创建一个 pre.sh 和 post.sh 脚本,在 ubuntu 机器运行 veeam 备份之前和之后运行,将在备份之前关闭 MongoDB 和使用 MongoDB 的 webservice(myservice),并在备份完成后再次启动它。例如:

pre-and-post-script-for-veeam.sh
systemctl stop myservice
systemctl stop mongod
exit 0

和

pre_and_post_veeam_post.sh
systemctl start mongod
systemctl start myservice
exit 0

我强烈建议进行适当的错误处理——在这里传递 systemctl 命令的错误代码。

像这样选择 shell 脚本的路径:

veeam 作业设置启用脚本


按类别查看类似文章: Linux MongoDB Veeam