Showing results for 
Search instead for 
Did you mean: 

Has anyone created an Expect script to backup the configuration file of the ZoneDirector?

New Contributor
I would like to run this as a daily job from my Unix server.

Contributor III
hmm.. yes. I should have included a much simpler example.
Try this:

./ruckusconf --enable --command "show conf"
Let me know how that works for you.

If you need it to do more/other things, let me know.
There are *lots* of other options.

New Contributor II
Hi Bill!
Thanks for the quick reply (and for the tool)
I'm a fairly new Ruckus user so forgive all my questions:

I can't seem to get my stand alone access points (I have both ZD and some stand alone APs) to work with this. They don't seem to have "show conf" so this won't work right? Do you (or does anyone else) happen to know the equivalent command line syntax?

I'm trying this against my zonedirector:
./ruckusconf --enable --command "show conf" --quite --outfile /some/path/on/server/output. MY_ZD_IP_HERE

I must misunderstand how --quiet is supposed to work, when I include it I do not get any relevant data in my output file. If I do not include --quiet, I get the output correctly saved into the outfile, but also on screen. My goal was to be able to cron the script up in order to automatically download/save a copy of the configuration.

Not necessarily a question for Bill but:
The output I see doesn't appear to be restoreable in any way, it's not like my network switches that output a list of commands that I could paste back into a shell session of a replacement device. Am I wrong about this?


Contributor III
Joel: Sorry if I'm a little rusty on this but here are my answers:
(Last question answered first)

You're right, you can't re-enter the output of "show conf" to restore a config.
If I were you, I would enter a feature request on this site for a "show" command that provides "usable"/enterable configuration as its output.
Open a support ticket and ask for them to recognize/add the feature request.
Then, call your sales person and ask for that feature request to be given a priority.

I'm not saying that'll get you anywhere but we shouldn't get too upset about things being broken if we're not willing to push for a solution.

re: --quiet:
Yea. that's not doing what you want.
(and I don't recall what the use-case for it was)

re: cronfiles:
My approach would be to write a wrapper that calls ruckusconf and sends output to /dev/null
Also: you probably want to put the --outfile parameter before the --command parameter.

note: if you're going to schedule ruckusconf in cron you probably have to use the --password option. Embedded passwords are difficult to secure in a linux/unix environment.
Make sure your linux box can only be used by trusted people.

note: I was working on a solution to the embedded passwords for scheduled jobs problem that involved using the --repeatevery option to avoid the use of cron.
I don't recall if it was in a working state but feel free to play w/ it.

re: downloading information from standalone access points:
that's what the --ap option is for.
"./ruckusconf --example"
to see an example.

Let me know how that works for you.

Has anyone been able to get Bill's ruckusconf script working? I am getting a syntax error returned:

sh --enable --command "show conf" x.x.x.x line 64: syntax error near unexpected token `}' line 64: `  } else {

Any help appreciated.

If anyone stumbles across this I got it working. I was running the script without 'expect' - d'oh! 

expect --enable --outfile /path/to/outputdir/ --command "show conf" x.x.x.x

Obviously update username and password within the script.