Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

CUE 2.3.1 and Automatic backups

Looking for the preferred way to configure an automatic backup of CUE to an FTP server. I know CUE does not support this out of the box, but is a TCL script or other script needed? Thanks.

2 REPLIES
Cisco Employee

Re: CUE 2.3.1 and Automatic backups

Might be somewhat of a personal preference. I like using expect/tcl since it's easy to create the script and have it handle the interactive nature of performing the backup.

New Member

Re: CUE 2.3.1 and Automatic backups

This is the sample script that I have...

Requirements:

A server as the script server.

Setup:

The script server and the router/CUE should be on the same subnet.

The backup server, which stores the backed up CUE configuration and data, can be a different machine than the script server.

The script server must have the correct environment set up to run the TCL script.

The path to store the backups must have been configured. Make sure manual back up is operating before running the automatic script.

Example of TCL Script

The example below shows that the TCL script is activated at 23:00. At this time the script sessions into CUE through the console port and runs the CLI commands to initiate the backup. A prompt from the CUE signals that the back up is done. The script then exits from CUE and the whole back up process is complete.

#!/export/home4/ats4.0/bin/expect

while 1 {

sleep 40

set currTime [clock seconds]

set hour [clock format $currTime -format %H]

puts "Current hour is: $hour"

if {$hour != 23} {

continue

}

spawn telnet

expect "telnet>"

send "open 192.168.1.1 2001\r"

expect .*

send "\r"

expect ">"

send "en\r"

expect "Password:"

send "cisco\r"

expect "#"

send "ser ser 1/0 sess\r"

expect .*

sleep 2

send "\r"

expect ">"

send "offline\r"

expect "offline"

send "y\r"

expect "offline)"

send "\r"

expect .*

send "backup category all\r"

sleep 240

expect "offline"

send "continue\r"

expect ">"

send "exit\r"

expect "#"

send "exit\r"

expect "RETURN"

send "\035"

expect ">"

send "close\r"

expect ">"

send "quit\r"

expect .*

sleep 5

}

Question - does the script server really need to be on the same subnet? And what type of server is this - a Unix or Linux box or can it be a Wintel server? Thanks.

194
Views
0
Helpful
2
Replies
CreatePlease to create content