Skip to content

Instantly share code, notes, and snippets.

@dsieborger
Created April 9, 2015 18:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsieborger/79a07aea42fa832cc092 to your computer and use it in GitHub Desktop.
Save dsieborger/79a07aea42fa832cc092 to your computer and use it in GitHub Desktop.
Download binary config file from Ruckus ZoneDirector
#!/bin/sh
# Download the binary config file from a Ruckus ZoneDirector.
#
# Tested with 9.8.2 on a ZD5000. May well need to be adjusted for other
# versions.
USERNAME=xxx
PASSWORD=xxx
ZDURL=https://zonedirector.example
COOKIES=cookies.txt # will be overwritten if it exists
CURL="curl -sS -c $COOKIES --cacert /path/to/cacert.pem"
# add -v for debugging
TIME=`date +%m%d%y_%H_%M`
$CURL -o /dev/null -d username=$USERNAME -d password=$PASSWORD -d ok=Log\ In \
$ZDURL/admin/login.jsp && \
sleep 3 && \
$CURL -o /dev/null -b $COOKIES $ZDURL/admin/login.jsp && \
$CURL -OJ -b $COOKIES $ZDURL/admin/_savebackup.jsp\?time=$TIME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment