Backing up Cisco VTP configuration
-
I have a script that logs into our Cisco switches as a limited user and runs
show running-config view full
on a periodic basis. It then dumps the output of that command to a text file, saves that file into a local git repository, and then commits and pushes to the off-site repository if necessary.This morning, we made a change to our VTP configuration, and the backup script didn't observe any configuration differences. I've done a little digging, and it seems that most of the information is stored in the vlan.txt database file, but from looking into the file, it doesn't look like it's in a very good format to give someone an overview of what's actually configured (or to recreate it). Has anyone found a set of commands for backing up the VTP configuration that's more readable/useful than just TFTPing off the vlan.txt database?
-
@izzion said in Backing up Cisco VTP configuration:
Cisco switch
No experience, but I've heard bad things about dealing with their configuration tools.
@izzion said in Backing up Cisco VTP configuration:
vlan.txt
Well if it's a .txt then that means diff-able, and that's mostly all that matters for change history, and when restoring it you won't be trying to recreate it by hand, right?
-
@Tsaukpaetra
Weeellll...a) I'd still have to TFTP it off the switch to somewhere, which probably isn't a showstopper, and...
b) When I use more on the switch to view the contents of the file, it was a hexbinary file like the old hex edit files of old. And when I did TFTP it off and open it with Notepad++, well,ºÛ myvtpdomain.sample <!--snip the actual relevant stuff with lots more NUL characters thrown in-->
-
@izzion said in Backing up Cisco VTP configuration:
Oof, a text file that lies about being a text file. Joy of joys.
Yeah, unless Cisco provides a real utility to translate the file into human-readable, I don't think you'll get very far...