Backup/Restore from RANCID

DOWNLOAD THE LATEST FIRMWARE HERE
User avatar
SyncKev
Member
 
Posts: 6
Joined: Wed Dec 09, 2015 3:24 pm
Location: Bremen, GA
Has thanked: 0 time
Been thanked: 1 time

Backup/Restore from RANCID

Thu Dec 17, 2015 3:47 pm

WS-12-250-AC
Firmware Ver 1.3.8

For purposes of replacing a failed device, we store backup configs using RANCID and load the backup configs on replacement devices.
We use this on Adtran, Juniper, and other manufacturer's routers/switches.

Experimenting with backup/restore from the Netonix WS-12-250-AC, I have been unable to restore any backups that contain information from 'show config'. I do not get an error; the switch just reboots to the unedited config.
When I compare this to the file saved from the 'Backup' option, I see that there are some differences, including security certificate information. Any changes to the saved restore file (i.e. system name or IP address) results in a corrupted system which I then default to get running again.

Does anyone successfully use RANCID to backup configs for Netonix switches that work for restoration of the config to a replacement switch?

Thanks

User avatar
sirhc
Employee
Employee
 
Posts: 7421
Joined: Tue Apr 08, 2014 3:48 pm
Location: Lancaster, PA
Has thanked: 1609 times
Been thanked: 1326 times

Re: Backup/Restore from RANCID

Thu Dec 17, 2015 4:38 pm

You do realize there is an "auto" backup to tftp server that will create a backup file anytime there is a change made to the switch.

This feature is located on the Device/Configuration Tab
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.

User avatar
SyncKev
Member
 
Posts: 6
Joined: Wed Dec 09, 2015 3:24 pm
Location: Bremen, GA
Has thanked: 0 time
Been thanked: 1 time

Re: Backup/Restore from RANCID

Thu Dec 17, 2015 4:59 pm

Yes. I would prefer to use RANCID to keep all configs in the same location, and allowing easy diff capability; however, I will use the auto backup if that is the only option.
Thank you

User avatar
sirhc
Employee
Employee
 
Posts: 7421
Joined: Tue Apr 08, 2014 3:48 pm
Location: Lancaster, PA
Has thanked: 1609 times
Been thanked: 1326 times

Re: Backup/Restore from RANCID

Thu Dec 17, 2015 5:04 pm

SyncKev wrote:Yes. I would prefer to use RANCID to keep all configs in the same location, and allowing easy diff capability; however, I will use the auto backup if that is the only option.
Thank you


I will ask the programmer Eric to review this thread.
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.

User avatar
jbaird
Member
 
Posts: 43
Joined: Fri Oct 09, 2015 3:47 pm
Location: Danville, KY
Has thanked: 0 time
Been thanked: 2 times

Re: Backup/Restore from RANCID

Fri Dec 18, 2015 2:22 pm

SyncKev wrote:Yes. I would prefer to use RANCID to keep all configs in the same location, and allowing easy diff capability; however, I will use the auto backup if that is the only option.
Thank you


+1 for RANCID support. RANCID is widely used across all platforms on our network, and it would be nice if we could use it to backup our Netonix configs as well.

User avatar
sirhc
Employee
Employee
 
Posts: 7421
Joined: Tue Apr 08, 2014 3:48 pm
Location: Lancaster, PA
Has thanked: 1609 times
Been thanked: 1326 times

Re: Backup/Restore from RANCID

Fri Dec 18, 2015 2:24 pm

I created an instance in our internal software for Eric (the programmer) to look into for you.
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.

User avatar
Eric Stern
Employee
Employee
 
Posts: 532
Joined: Wed Apr 09, 2014 9:41 pm
Location: Toronto, Ontario
Has thanked: 0 time
Been thanked: 130 times

Re: Backup/Restore from RANCID

Fri Dec 18, 2015 3:38 pm

Don't know much about RANCID other than the little bit I just read about it. As I understand it you need to write a RANCID script to handle the device. So here is some information that might help.

The GUI backup/restore method uses a binary file (its a tar archive) that contains the configuration file and a few other things. This is the best way to do it. You can also do it from the CLI. The CLI has the "copy" command get the backup file to/from the device, but then you need to run a TFTP server which might not be convenient. You can also do it from the command line.

- use the "cmdline" CLI command to get to the linux command line
- use the "config_backup" command to create the backup file (/tmp/wispswitch_config.tar)
- use scp to get the backup file from the switch
- un-tar the file to get at the config.json file
- use the config.json file to do the diff so RANCID can report the changes

To restore you can reverse the process
- copy the backup file to switch using scp (lets say you copy it to /tmp/restore_config.tar)
- use the "cmdline" CLI command to get to the linux command line
- change to the /www directory
- run "php-cli config.php --restore /tmp/restore_config.tar"
- run "reboot"

User avatar
mnitech
Member
 
Posts: 21
Joined: Wed Oct 21, 2015 1:21 pm
Location: Morgan Hill, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Backup/Restore from RANCID

Fri Dec 25, 2015 2:10 pm

Can you share your scripts and settings to get rancid to run on a Netonix?

User avatar
SyncKev
Member
 
Posts: 6
Joined: Wed Dec 09, 2015 3:24 pm
Location: Bremen, GA
Has thanked: 0 time
Been thanked: 1 time

Re: Backup/Restore from RANCID

Wed Dec 30, 2015 9:47 am

Eric Stern wrote:Don't know much about RANCID other than the little bit I just read about it. As I understand it you need to write a RANCID script to handle the device. So here is some information that might help.

The GUI backup/restore method uses a binary file (its a tar archive) that contains the configuration file and a few other things. This is the best way to do it. You can also do it from the CLI. The CLI has the "copy" command get the backup file to/from the device, but then you need to run a TFTP server which might not be convenient. You can also do it from the command line.

- use the "cmdline" CLI command to get to the linux command line
- use the "config_backup" command to create the backup file (/tmp/wispswitch_config.tar)
- use scp to get the backup file from the switch
- un-tar the file to get at the config.json file
- use the config.json file to do the diff so RANCID can report the changes

To restore you can reverse the process
- copy the backup file to switch using scp (lets say you copy it to /tmp/restore_config.tar)
- use the "cmdline" CLI command to get to the linux command line
- change to the /www directory
- run "php-cli config.php --restore /tmp/restore_config.tar"
- run "reboot"


Eric,
Thank you for the reply. RANCID works by parsing the output from command line entries executed. For example, part of the script for Adtran devices issues the command "show running-config". I have adjusted a script for Netonix, which captures the output for 'show config'; however, it does not contain enough information for a restore. Is there a command line function that will out put the full config needed for a restore? Thank you.

User avatar
SyncKev
Member
 
Posts: 6
Joined: Wed Dec 09, 2015 3:24 pm
Location: Bremen, GA
Has thanked: 0 time
Been thanked: 1 time

Re: Backup/Restore from RANCID

Wed Dec 30, 2015 9:49 am

mnitech wrote:Can you share your scripts and settings to get rancid to run on a Netonix?


I would be happy to, but currently it does not backup the full config, just the output from 'show config'.
If a working script develops, I will share it.

Next
Return to Hardware and software issues

Who is online

Users browsing this forum: No registered users and 22 guests