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).exp\n”
expect -re “.*NSA 3500>”
send “exit\n”
EOF

Captura de Tela 2015-06-11 às 15.24.22

2 thoughts on “Rundeck – Shell Script Backup Sonicwall

  1. Fala Diegão, BLZA??

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

    Falow Brother

Leave a comment