logo logo
关于我们

技术分享

技术分享 domino备份脚本

domino备份脚本

2021-06-08

crontab -e

10 0 * * 7  sh /backup/dominobackup.sh

[root@mail backup]# vi dominobackup.sh 

## author : chenjunyong        ##

## Time   : 2018-3-1           ##

## file   : dominobackup.sh    ##

## back domino server bash     ##


#!/bin/bash

DOM_HOME=/opt/lotus/notesdata/

DOM_USER=notesinstall

DOM_PROG=/opt/lotus/bin

DAT=`date +%Y-%m-%d`

DST="/nas/fullback/"

LOG=$DST


echo "Starting Backup" > $LOG/back$DAT.log

echo -n Stopping domino: >> $LOG/back$DAT.log

cd $DOM_HOME

echo Y | su $DOM_USER -c "$DOM_PROG/server -q"

echo -n kill domino:  >> $LOG/back$DAT.log

count=`ps -ef |grep notes/latest |grep -v "grep" |wc -l`

if [ $count -eq 0 ]; then

   echo "seccess to quit" >> $LOG/back$DAT.log

else

   su $DOM_USER -c "$DOM_PROG/nsd -kill " >> $LOG/back$DAT.log

fi

mkdir  $DST$DAT/

echo "pls waiting!  backuping Data now" >> $LOG/back$DAT.log

cp -rvp /opt/lotus/notesdata/.   $DST$DAT/ >> $LOG/back$DAT.log

#if [ $? -eq 0 ];then

#   echo "ChinaFair  mailbackup has been finished successfully" | mail -s "mailbackup successfully"  admin@chinafairproperties.com < $LOG/back$DAT.log

#else

#   echo "ChinaFair mailbackup failed" | mail -s "mysql backup failed"  admin@chinafairproperties.com < $LOG/back$DAT.log

#fi

echo   "Finished COPY!" >> $LOG/back$DAT.log

echo -n Starting domino:

count=`ps -ef |grep notes/latest |grep -v "grep" |wc -l`

if [ $count -eq 0 ]; then

   su $DOM_USER -c "$DOM_PROG/server"

else

   su $DOM_USER -c "$DOM_PROG/nsd -kill " >> $LOG/back$DAT.log

   su $DOM_USER -c "$DOM_PROG/server"

fi

echo "Backup Finished !" >> $LOG/back$DAT.log


云祺备份软件,云祺容灾备份系统,虚拟机备份,数据库备份,文件备份,实时备份,勒索软件,美国,图书馆
  • 标签:
  • 网络安全

您可能感兴趣的新闻 换一批

现在下载,可享30天免费试用

立即下载

jia7jia_7
请添加好友
为您提供支持

请拨打电话
为您提供支持

400-9955-698