Rundeck – Shell Script Backup Sonicwall

How to create a Rundeck Job to Backup Sonicwall over FTP.

#!/bin/bash

set variables for easy changes

user=admin
password="SW_PASSWORD"
name=$1
host=$2

load from bash

/usr/bin/expect <"
send "export preferences ftp ftp.diegoluisi.eti.br dluisi "FTP_PASSWORD" $name-$(date +%Y-%m-%d).expn"
expect -re ".*NSA 3500>"
send "exitn"
EOF

Captura de Tela 2015-06-11 às 15.24.22

You may also like...

2 Responses

  1. Ernander says:

    Fala Diegão, BLZA??

    vc pode deixar seu Script UNIVERSAL mundando a linha “expect -re “.*NSA 3500>”” por “expect -re “.*>””

    Falow Brother

  2. Obrigado Ernander, ele já esta funcionando universal.

    Mas vou recriar essa linha, abraço!

Leave a Reply

Your email address will not be published. Required fields are marked *