BACK TO SUPPORT PORTAL
RUCKUS Technologies
Wired
Wireless
Cloud Services
Miscellaneous
RUCKUS Lennar Support
Lennar Knowledge Base
RUCKUS Lennar Support
Resources
Community
Technical
Register
RUCKUS Technologies
Home
RUCKUS Technologies and Products
ICX Switches
i am looking for script through i can take weekly backup of configuration.
unknown
Hi All,
I hope that you are doing well...
i am new in Brocade ICX family switches.
i have one small query if any one can help me, it will be highly appreciated !!!!
we have Brocade ICX 7450,7250 and 6430 switches and i am looking for script through i can take weekly backup of configration.
i have spend so much time to make it possible by using their in buit option which is Batch buffer but unfortunatly it not work as i accepted.
so dear all , i am looking hopefully your response.
Thanks in Advance
Find more posts tagged with
Accepted answers
All comments
unknown
How is your python? You could easily write a script utilizing
netmiko
to accomplish this.
scott_farrand_f
Take a look at Rancid -
http://www.shrubbery.net/rancid/
unknown
Hi, thanks for reply, i have not used python yet but i heard lots of about it and i am interested to do !!!
do one favor for me.
how to start it ? please give me some guidelines....
unknown
Hi, as i did some googling and got info about python and script for network backup.
i have installed it on my windows system.
but when i trying to execute that script, it showing an error as below.
------------------------------------------------------------------------------------------------------
C:\Users\ibmwlengr1\AppData\Local\Programs\Python\Python37-32>python autobackup-cisco.py
Traceback (most recent call last):
File "autobackup-cisco.py", line 1, in
from netmiko import ConnectHandler
ModuleNotFoundError: No module named 'netmiko'
------------------------------------------------------------------------------------------------------
so i have downloaded netmiko 2.2.2 but still i am getting error like above.
please help
unknown
Hi,
as you asked to me Q, How is my python? , honestly i tell you i heard lots of about it but never used, today i used it and frankly i tell u its amazing, i started finding more about it and i got script for cisco switch and as tested it works !!!
do you have any scrip for brocade ICX switches ?
i really appreciate your help ....
unknown
Solar Winds NCM does a great job of it in Orion.
scott_farrand_f
Apparently the link I shared for Rancid was deemed spam.
Rancid is a free tool that has an ICX/Brocade module that will automatically poll the configuration of a given switch, it leverages code versioning software to maintain an archive of all switch/router configuration changes, and can be configured to automatically e-mail a network team to alert them about configuration changes made to networking environment.
If you're going to delete comments like mine as "spam" perhaps you should also delete references to other software solutions.
unknown
If you need a python script I can help.
If you have python installed check that you have setup_tools installed too.
If you don't then:
1) Download:
https://bootstrap.pypa.io/get-pip.py
2) python get-pip.py
Install netmiko:
# pip install netmiko
Then the script:
from netmiko import ConnectHandler
from datetime import datetime
import argparse
from getpass import getpass
def main(conf):
conn = ConnectHandler(**conf)
dump = conn.send_command('show run')
filename = 'backup_%(ip)s_%(timestamp)s.conf' % {
'ip': conf.get('ip'),
'timestamp': datetime.now().strftime('%s')
}
with open(filename, 'wb+') as dump_file:
dump_file.write(dump)
if __name__ == '__main__':
command_line = argparse.ArgumentParser()
command_line.add_argument('--ip', help='IP address of your ruckus ICX')
command_line.add_argument('--username', help='SSH username')
command_line.add_argument('--password',
help='SSH password (clear text btw!)')
try:
args = command_line.parse_args()
except TypeError:
print u'Unable to parse args'
else:
if None in (args.ip, args.username):
print u'IP and username is required'
else:
_password = args.password
if not _password:
_password = getpass()
conf = {
'device_type': 'ruckus_fastiron',
'ip': args.ip,
'username': args.username,
'password': _password
}
main(conf)
Save it as "backup_icx.py".
To execute help:
$ python backup_icx.py --help
--ip -> ip address of the icx to backup
--username -> ssh username
--password -> ssh password
To create a backup
$ python backup_icx.py --ip= --username= --password=
Becareful that password is in clear text. If you don't specify a password arg then you will be prompted for one:
$ python backup_icx.py --ip= --username=
You will need SSH enable on the hardware for this to work.
Backups will be saved on the same directory under the name "backup__.conf"
Sorry for the quickly put together script but this could guide you a little.
Cheers!
unknown
This is great! But if you want to get around having your password in cleartext, import the getpass module and use that.
import getpass
password = getpass.getpass()
It will create a prompt for your password and not show it in cleartext at your console. It's perfect for this situation.
unknown
If you don't specify a --password arg the script will prompt for a password.
BTW, I would NOT recommend having this script running under windows. Paramiko will try to emulate SSH and would be slooooow. Try running it under linux and create a cron to forget about it
🙂
jzsjr
Scott
I've not heard of Rancid. Sounds like a winner. I've been using BNA for years and it includes backing up configs.
Jim
Quick Links
🗂️ All Categories
📄 Recent Posts
❓ Unanswered
🆘 Help
Tags
SmartZone or vSZ
RUCKUS Self-Help
Cloudpath
ICX
AP Management
vSZ
Access points
ICX Switch Management
Lennar homes
SmartZone