tar备份以日期命名
****************************************************************************************
#vi backup.sh
DATE=`date +%Y-%m-%d`
tar -cvzf /mnt/sdb1/AirFreightBK/AirF.$DATE.tar.gz /mnt/120/IT/Databasebackup/DatabaseAirfreight/Airfreight_20180111
tar -cvzf /mnt/sdb1/TicketingBK/Tick.$DATE.tar.gz /mnt/120/IT/Databasebackup/DatabaseTicketing/Ticketing_20180111
****************************************************************************************
将超过7日的备份找到后删除,此删除命令可以添加到backup.sh的顶部
****************************************************************************************
find /mnt/sdb1/AirFreightBK/ -type d -mtime +7 -exec rm -f {} ;
find /mnt/sdb1/TicketingBK/ -type d -mtime +7 -exec rm -f {} ;
****************************************************************************************