<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i am looking for script through i can take weekly backup of configuration. in ICX Switches</title>
    <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37601#M2594</link>
    <description>If you need a python script I can help.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;If you have python installed check that you have setup_tools installed too.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;If you don't then:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;1) Download:&amp;nbsp;&lt;A alt="" href="https://bootstrap.pypa.io/get-pip.py" name="" rel="nofollow" target="" title="" type="" value=""&gt;https://bootstrap.pypa.io/get-pip.py&lt;/A&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;2) python get-pip.py&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Install netmiko:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# pip install netmiko&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Then the script:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from netmiko import ConnectHandler&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from datetime import datetime&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;import argparse&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from getpass import getpass&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;def main(conf):&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; conn = ConnectHandler(**conf)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; dump = conn.send_command('show run')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; filename = 'backup_%(ip)s_%(timestamp)s.conf' % {&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'ip': conf.get('ip'),&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'timestamp': datetime.now().strftime('%s')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; with open(filename, 'wb+') as dump_file:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dump_file.write(dump)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;if __name__ == '__main__':&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line = argparse.ArgumentParser()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--ip', help='IP address of your ruckus ICX')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--username', help='SSH username')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--password',&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help='SSH password (clear text btw!)')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; try:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; args = command_line.parse_args()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; except TypeError:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print u'Unable to parse args'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; else:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if None in (args.ip, args.username):&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print u'IP and username is required'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _password = args.password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not _password:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _password = getpass()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conf = {&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'device_type': 'ruckus_fastiron',&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'ip': args.ip,&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'username': args.username,&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'password': _password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; main(conf)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Save it as "backup_icx.py".&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;To execute help:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --help&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--ip -&amp;gt; ip address of the icx to backup&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--username -&amp;gt; ssh username&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--password -&amp;gt; ssh password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;To create a backup&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --ip=&lt;IP address=""&gt; --username=&lt;SSH username=""&gt; --password=&lt;SSH password=""&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Becareful that password is in clear text. If you don't specify a password arg then you will be prompted for one:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --ip=&lt;IP address=""&gt; --username=&lt;SSH username=""&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;You will need SSH enable on the hardware for this to work.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Backups will be saved on the same directory under the name "backup_&lt;IP address=""&gt;_&lt;TIMESTAMP&gt;.conf"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Sorry for the quickly put together script but this could guide you a little.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Cheers!&lt;/TIMESTAMP&gt;&lt;/IP&gt;&lt;/SSH&gt;&lt;/IP&gt;&lt;/SSH&gt;&lt;/SSH&gt;&lt;/IP&gt;</description>
    <pubDate>Tue, 21 Aug 2018 23:57:37 GMT</pubDate>
    <dc:creator>fernando_fl_rez</dc:creator>
    <dc:date>2018-08-21T23:57:37Z</dc:date>
    <item>
      <title>i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37593#M2586</link>
      <description>Hi All,&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;I hope that you are doing well...&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;i am new in Brocade ICX family switches.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;i have one small query if any one can help me, it will be highly appreciated !!!!&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;we have Brocade ICX 7450,7250 and 6430 switches and i am looking for script through i can take weekly backup of configration.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;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.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;so dear all , i am looking hopefully your response.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Thanks in Advance&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;</description>
      <pubDate>Fri, 17 Aug 2018 03:41:07 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37593#M2586</guid>
      <dc:creator>pradeep_sonawne</dc:creator>
      <dc:date>2018-08-17T03:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37594#M2587</link>
      <description>How is your python? You could easily write a script utilizing &lt;A alt="" href="https://github.com/ktbyers/netmiko" name="" rel="nofollow" target="" title="" type="" value=""&gt;netmiko&lt;/A&gt; to accomplish this.&amp;nbsp;</description>
      <pubDate>Fri, 17 Aug 2018 13:55:34 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37594#M2587</guid>
      <dc:creator>chris_hill_4zpl</dc:creator>
      <dc:date>2018-08-17T13:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37595#M2588</link>
      <description>&lt;P alt="" name="" rel="" target="" title="" type="" value=""&gt;Take a look at Rancid - &amp;nbsp;&lt;A alt="" href="http://www.shrubbery.net/rancid/" rel="nofollow noopener noreferrer" target="" title="" type="" value=""&gt;http://www.shrubbery.net/rancid/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 17:15:29 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37595#M2588</guid>
      <dc:creator>scott_farrand_f</dc:creator>
      <dc:date>2018-08-17T17:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37596#M2589</link>
      <description>Hi, thanks for reply, i have not used python yet but i heard lots of about it and i&amp;nbsp;am interested to do !!!&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;do one favor for me.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;how to start it ? please give me some guidelines....&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;</description>
      <pubDate>Sat, 18 Aug 2018 02:58:55 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37596#M2589</guid>
      <dc:creator>pradeep_sonawne</dc:creator>
      <dc:date>2018-08-18T02:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37597#M2590</link>
      <description>Hi, as i did some googling and got info about python and script for network backup.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;i have installed it on my windows system.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;but when i trying to execute that script, it showing an error as below.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;------------------------------------------------------------------------------------------------------&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;C:\Users\ibmwlengr1\AppData\Local\Programs\Python\Python37-32&amp;gt;python autobackup-cisco.py&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Traceback (most recent call last):&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; File "autobackup-cisco.py", line 1, in &lt;MODULE&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; from netmiko import ConnectHandler&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;ModuleNotFoundError: No module named 'netmiko'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;------------------------------------------------------------------------------------------------------&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;so i have downloaded&amp;nbsp;netmiko 2.2.2 but still i am getting error like above.&lt;BR /&gt;&lt;BR /&gt;please help&lt;/MODULE&gt;</description>
      <pubDate>Sat, 18 Aug 2018 07:58:12 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37597#M2590</guid>
      <dc:creator>pradeep_sonawne</dc:creator>
      <dc:date>2018-08-18T07:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37598#M2591</link>
      <description>Hi,&lt;BR /&gt;as you asked to me Q,&amp;nbsp; 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&amp;nbsp; and i got script for cisco switch and as tested it works !!!&lt;BR /&gt;do you have any scrip for brocade ICX switches ?&lt;BR /&gt;i really appreciate your help ....</description>
      <pubDate>Sat, 18 Aug 2018 11:36:52 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37598#M2591</guid>
      <dc:creator>pradeep_sonawne</dc:creator>
      <dc:date>2018-08-18T11:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37599#M2592</link>
      <description>Solar Winds NCM does a great job of it in Orion.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;</description>
      <pubDate>Mon, 20 Aug 2018 12:41:25 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37599#M2592</guid>
      <dc:creator>netwizz</dc:creator>
      <dc:date>2018-08-20T12:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37600#M2593</link>
      <description>Apparently the link I shared for Rancid was deemed spam.&amp;nbsp; &lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;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.&lt;B alt="" name="" rel="" target="" title="" type="" value=""&gt;&lt;/B&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;If you're going to delete comments like mine as "spam" perhaps you should also delete references to other software solutions.</description>
      <pubDate>Tue, 21 Aug 2018 13:55:49 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37600#M2593</guid>
      <dc:creator>scott_farrand_f</dc:creator>
      <dc:date>2018-08-21T13:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37601#M2594</link>
      <description>If you need a python script I can help.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;If you have python installed check that you have setup_tools installed too.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;If you don't then:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;1) Download:&amp;nbsp;&lt;A alt="" href="https://bootstrap.pypa.io/get-pip.py" name="" rel="nofollow" target="" title="" type="" value=""&gt;https://bootstrap.pypa.io/get-pip.py&lt;/A&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;2) python get-pip.py&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Install netmiko:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# pip install netmiko&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Then the script:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from netmiko import ConnectHandler&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from datetime import datetime&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;import argparse&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;from getpass import getpass&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;def main(conf):&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; conn = ConnectHandler(**conf)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; dump = conn.send_command('show run')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; filename = 'backup_%(ip)s_%(timestamp)s.conf' % {&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'ip': conf.get('ip'),&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'timestamp': datetime.now().strftime('%s')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; with open(filename, 'wb+') as dump_file:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dump_file.write(dump)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;if __name__ == '__main__':&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line = argparse.ArgumentParser()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--ip', help='IP address of your ruckus ICX')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--username', help='SSH username')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; command_line.add_argument('--password',&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help='SSH password (clear text btw!)')&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; try:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; args = command_line.parse_args()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; except TypeError:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print u'Unable to parse args'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; else:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if None in (args.ip, args.username):&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print u'IP and username is required'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _password = args.password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not _password:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _password = getpass()&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conf = {&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'device_type': 'ruckus_fastiron',&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'ip': args.ip,&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'username': args.username,&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'password': _password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; main(conf)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Save it as "backup_icx.py".&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;To execute help:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --help&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--ip -&amp;gt; ip address of the icx to backup&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--username -&amp;gt; ssh username&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;--password -&amp;gt; ssh password&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;To create a backup&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --ip=&lt;IP address=""&gt; --username=&lt;SSH username=""&gt; --password=&lt;SSH password=""&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Becareful that password is in clear text. If you don't specify a password arg then you will be prompted for one:&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$ python backup_icx.py --ip=&lt;IP address=""&gt; --username=&lt;SSH username=""&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;You will need SSH enable on the hardware for this to work.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Backups will be saved on the same directory under the name "backup_&lt;IP address=""&gt;_&lt;TIMESTAMP&gt;.conf"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Sorry for the quickly put together script but this could guide you a little.&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Cheers!&lt;/TIMESTAMP&gt;&lt;/IP&gt;&lt;/SSH&gt;&lt;/IP&gt;&lt;/SSH&gt;&lt;/SSH&gt;&lt;/IP&gt;</description>
      <pubDate>Tue, 21 Aug 2018 23:57:37 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37601#M2594</guid>
      <dc:creator>fernando_fl_rez</dc:creator>
      <dc:date>2018-08-21T23:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37602#M2595</link>
      <description>This is great! But if you want to get around having your password in cleartext, import the getpass module and use that.&lt;BR /&gt;&lt;BR /&gt;import getpass&lt;BR /&gt;&lt;BR /&gt;password = getpass.getpass()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It will create a prompt for your password and not show it in cleartext at your console. It's perfect for this situation.&amp;nbsp;</description>
      <pubDate>Wed, 22 Aug 2018 00:11:34 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37602#M2595</guid>
      <dc:creator>chris_hill_4zpl</dc:creator>
      <dc:date>2018-08-22T00:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37603#M2596</link>
      <description>If you don't specify a --password arg the script will prompt for a password.&lt;BR /&gt;&lt;BR /&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 22 Aug 2018 00:13:28 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37603#M2596</guid>
      <dc:creator>fernando_fl_rez</dc:creator>
      <dc:date>2018-08-22T00:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37604#M2597</link>
      <description>Scott&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;I've not heard of Rancid.&amp;nbsp; Sounds like a winner.&amp;nbsp; I've been using BNA for years and it includes backing up configs.&amp;nbsp;&amp;nbsp;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Jim</description>
      <pubDate>Wed, 22 Aug 2018 19:58:41 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37604#M2597</guid>
      <dc:creator>jzsjr</dc:creator>
      <dc:date>2018-08-22T19:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: i am looking for script through i can take weekly backup of configuration.</title>
      <link>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37605#M2598</link>
      <description>Hi Pradeep,&lt;BR /&gt;&lt;BR /&gt;I need to take backup configuration for cisco and back up switches. If u already found that scripts for this task , can u share me ?</description>
      <pubDate>Fri, 19 Jul 2019 13:22:07 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/ICX-Switches/i-am-looking-for-script-through-i-can-take-weekly-backup-of/m-p/37605#M2598</guid>
      <dc:creator>madhulika_v</dc:creator>
      <dc:date>2019-07-19T13:22:07Z</dc:date>
    </item>
  </channel>
</rss>

