Files
CmiiDeploy/4-广西移动项目/同步配置-数据/NFS/backup_nfs.sh
zeaslity 437acbeb63 add
2024-10-30 16:30:51 +08:00

12 lines
348 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
if [[ $( ip addr | grep 10.165.81.88 | wc -l) -eq 1 ]]; then
echo "当前主机为 主NFS节点 当前时间为 $(date) " >> /etc/nfs/backup_nfs.log
rclone sync /data backup_nfs:/data >> /etc/nfs/backup_nfs.log
echo "" >> /etc/nfs/backup_nfs.log
echo "----------------------------" >> /etc/nfs/backup_nfs.log
fi