By Googling, I found how to backup with RANCID a Cisco SRW2008P switch. I have modified those files to support not only a SRW switch but also a SG300 switch.
So, how to backup a SG300 series switch with RANCID?
- Download csblogin and csbrancid files and put them in the RANCID's PATH (in my case, /opt/rancid/bin). Don't forget to give them execution permissions.
- Edit rancid-fe file located in the RANCID's PATH (in my case, /opt/rancid/bin/rancid-fe) and insert a new item in the %vendortable dictionary:
'cisco-sb' => 'csbrancid',
- Insert the device to backup in the router.db file:
test.example.com:cisco-sb:up:
- Modify your .cloginrc file:
add user test.example.com {user}
add password test.example.com {password}
add autoenable test.example.com 1
add method test.example.com ssh
add userprompt test.example.com {"User Name:"}
- Enjoy it!