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.py2) 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!