Actually, this is my script:
#!/bin/bash # Backup DOCSIS CADANTS config ( sleep 5 echo "user" sleep 5 echo "password" sleep 5 echo "enable" sleep 2 echo "password" sleep 2 echo "copy startup-configuration tftp://192.168.0.1/cadant1.xml" sleep 5 echo "exit" ) | telnet 192.168.0.50 mv /srv/tftp/cadant1.xml /backups/devices/docsis/`date +%Y-%m-%d`_cadant1.xml
Where 192.168.0.50 – cadant, 192.168.0.1 – tftp server.
You can add the script to /etc/crontab for automatic execution (for example, every day at one in the morning):
0 1 * * * root /path/to/script/backup_cadants.sh > /dev/null 2>&1