Using the keep CT script to back up the configurations of Huawei switches (4) for ease of management, we can mount the windows shared folder to linux so that the backup
Data can be viewed at any time through windows, and corresponding scheduled tasks can be developed for the script to run automatically. Www.2cto.com 1. mount windows share to/mnt/share [root @ game-syslog-o/] mount-t cifs-ousername = switchbackup@game-inc.com, password = p @ ssw0rd // 192.168.36.74/Backup/mnt/share 2. edit rc. windows Shared www.2cto.com [root @ game-syslog-o/] vi/etc/rc is automatically mounted on local boot. localmount-t cifs-o username = switchbackup@game-inc.com,
Password = p @ ssw0rd // 192.168.36.74/Backup/mnt/share/3. edit the crontab scheduled task [root @ game-syslog-o/] crontab-e00 2 *** cd/opt &/bin/sh-x tar. sh # The script is stored in the opt directory, execute 00 3 ***/bin/cp-rf/opt/tftp/* .tar.gz/mnt/share/Switch/00 0 1 */bin/rm-rf/ mnt/share/Switch/* .tar.gz 00 1 1 **/bin/rm-rf/opt/tftp/* .tar.gz ~