Hello,
I want to backup firewall Netasq with NCM.
Actually i use a expect script like that :
#!/usr/bin/expect
## Declaration des variables ##
set ipwan [lindex $argv 0]
set pw [lindex $argv 1]
## Connexion ssh ##
spawn ssh admin@$ipwan #ou IP LAN
expect "?" {send "yes\r"}
expect "Password:" {send "$pw\r"}
expect ">" {send "rm /tmp/*.na\r"}
## Backup de la configuration en local ##
expect ">" {send "nsrpc admin:$pw@127.0.0.1\r"}
expect ">" {send "config backup list=all > /tmp/backup.na\r"}
expect ">" {send "quit\r"}
## Connexion sur FTP & depot du backup
expect ">" {send "ftp x.x.x.x\r"}
expect "):" {send "userftp\r"}
expect "Password:" {send "passwordftp\r"}
expect "ftp>" {send "put /tmp/*.na\n"}
expect "ftp>" {send "quit\r"}
expect ">" {send "exit\r"}
expect eof
Can i convert a expect script to NCM ?
Have you already a script for that ( nothing on forum ).
Thank you a lot.