Forum Discussion

Luca_55898's avatar
Luca_55898
Icon for Nimbostratus rankNimbostratus
Nov 29, 2011

backup script help

hi Guys,

 

 

Need some assistance getting a backup script to work from a linux box.

 

 

here is the script, its pretty simple:

 

 

 

set host sydipreflb01

 

 

spawn ssh root@$host

 

expect ""

 

send "b config save /config.ucs\r"

 

send "scp /config.ucs root@jenkins:/var/lib/jenkins/backup/F5/sydipreflb01-`date +%d_%m_%y`.ucs\r"

 

 

I have shared SSH keys and all that works.

 

When the script runs, it logs onto the F5, sits there for about 2 seconds then just exits without executing the b config save and scp commands.

 

 

If i remove the 'send' from the script i get errors saying

 

"Active] config invalid command name "b config save /config.ucs

 

while executing

 

""b config save /config.ucs\r""

 

 

Any thoughts?