标签:oca sys md5 rsync -av system bin inf host txt
#!/bin/bashBackup_dir="/backup"
IP_info=$(hostname -i | awk -F ‘ ‘ ‘{ print $2 }‘)
mkdir -p $Backup_dir/$IP_info
cd /
tar -zchf $Backup_dir/$IP_info/systembackup$(date +%F_week%u -d -1day).tar.gz ./etc/rc.local
find $Backup/$IP_info/ -type f -mtime +7 | xargs rm 2>/dev/null
find $Backup_dir/$IP_info -type f ! -name "finger*" | xargs md5sum > $Backup_dir/$IP_info/finger.txt
rsync -avz $Backup_dir/ rsync@172.168.0.41::backup --password-file=/etc/rsync.passwd
标签:oca sys md5 rsync -av system bin inf host txt
原文地址:https://blog.51cto.com/368145/2406516