#mkdir/mnt/airfreightdb
#mount-T cifs-o username=admin , Password=xxxxxxxx //< Span style= "Background-color: #00ff00" >192.168.42.5/appserv /mnt/ Airfreightdb
#ll/mnt/airfreightdb
#mkdir/mnt/sdb1/ Airfreightdb
#cd/mnt/sdb1/airfreightdb
#vi airfreightdb.sh
************************************
date= ' DATE +%y-%m-%d '
tar-cvzf/mnt/sdb1/airfreightdb/airfreightdb.$ date.tar.gz /mnt/airfreightdb
********************************************************************
#sh airfreightdb.sh
ll-h #使用 "-H" parameter, the displayed units are selected according to the size of the file "K", " M "or" G ".
Share 192.168.42.5 's Appserv, shut down Windows Firewall
Go to CentOS,
Set up the Mount folder, mount the AppServer,
Then SDB1 set up Airfreightdb folder, set up SH (set to automatically delete the backup before 7th),
Execute SH
Set up scheduling
****************************************************************
Seven days after test
Automatic deletion of backups before 7th
Rm-f/mnt/sdb1/airfreightdb/' date-d '-7 days ' +%y%m%d '. tar.gz
find/mnt/sdb1/airfreightdb/-type d-mtime +7-exec rm-f
CentOS mounts Windows shared folders and automatically backs up.