文件名称:ssh自动备份主机文件的脚本
文件大小:17KB
文件格式:PDF
更新时间:2024-02-10 09:29:02
date delete echo
代码如下: #!/bin/bash cd /home/backup/ echo “—” echo “delete start:”$(date +’%Y%m%d_%X’) echo ” delete…”$(date -d -5day +”%Y%m%d_%H%M”) rm -rf Web_$(date -d -6day +”%Y%m%d”)* echo “delete end:”$(date +’%Y%m%d_%X’) echo “—” echo “backup start:”$(date +’%Y%m%d_%X’) cp -R /home/www/ Web_$(date +”%Y%m%d_%H%