Where are the generations of configurations stored in RME 4.0.6?

Unanswered Question
May 5th, 2008

I'm looking to understand where the different versions of a device's configurations are stored; as far as directory paths on the server itself. We'd like to run a script to look up those versions and be able to display them on a web page.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Joe Clarke Mon, 05/05/2008 - 11:06

The versions are kept under NMSROOT\files\rme\dcma\devfiles on Windows and /var/adm/CSCOpx/files/rme/dcma/devfiles on Solaris. The directories here are indexed by RME device ID, so going through them is not easy. You would be better off using the cwcli command to extract the desired revision rather than going directly to the file system. For example:

cwcli config listversions -u admin -p admin -device nms-7206a

278

279

280

281

282

283

284

cwcli config export -u admin -p admin -version 279 -device nms-7206a

The latest version of each device's config can be found in the shadow directory (same path as above, but use shadow instead of devfiles). This directory is designed for direct use as the configs are indexed by device type and name.

philip.r.hayes Mon, 05/05/2008 - 11:17

I think we're getting close. One of our guys made a script that went out to the directory where the current config is stored and then fed that result into a web page. Basically, the purpose of the web page was to let an engineer know at a glance (without having to learn the CW interface or for a lot of training) if a device had it's config in CW. We were looking to expand that to the archived versions so an engineer would be able to quickly see the dates of versions.

jschweng Tue, 06/03/2008 - 14:36

This sounds exactly what I need. I need to be able to quickly and easily verify the version dates.

jschweng Tue, 06/03/2008 - 14:35

Finally an answer! Thanks for the clarification on the right directory. The RME guide said the files are in the DCMA directory. I've had so much trouble finding my archived files. So it turns out that I can't really use the ones in the devfiles folder? These are pulled fromt the Running config, correct? The ones in the shadow directory are binary, right? How would I read those natively?

Why does Cisco makes things so difficult?

Joe Clarke Tue, 06/03/2008 - 14:42

The devfiles directory contains all of the revisions used internally by Config Archive. They are text files, but they are indexed by the RME device ID, and not really designed for users to access directly.

The shadow directory is designed for direct user access. It contains the latest version of each device's config in clear text indexed by the device type and by name.

If you need revisions other than the latest, you can use the cwcli command I indicted in my first post on this thread.

jschweng Tue, 06/03/2008 - 14:46

Ok, thanks jclarke. How do you read the config files in the shadow directory. I've tried "cat", "vi", and "more" but none work. Do I need to rename each file from ".cfg" to ".txt"?

Thanks!

Joe Clarke Tue, 06/03/2008 - 15:27

They should already be in plain text. I use vi to read them on my Solaris box, but cat, more, less, etc. should work.

jschweng Wed, 06/04/2008 - 07:39

I finally figured out that you need to use quotes around the file name like this:

bash $cat "Switch1.cfg"

Can you clarify the date on each config file? I mean is that the date the file was archived?

Also, what is the purpose of the shadow.tar directory?

Thanks for the help!

Joe Clarke Wed, 06/04/2008 - 07:43

The date is the time the config last changed and was last archived. RME may have tried to archive the config after that date, but it did not detect an interesting change.

The shadow.tar file is something you must have created.

jschweng Wed, 06/04/2008 - 10:27

Yes, you're right. I believe one of my other guys created that tar file to pull all the configs off the server.

Now that I have the credentials in DCR matching what is in the switches, I reran the config archive (actually I ran a Synch job) and about half the switches failed. The reason given was "Internal error. Verify that archive exists for device."

Any ideas on why half the archives fail?

Joe Clarke Wed, 06/04/2008 - 10:31

Given this error, it is probably because the archive and the database are out of sync. Perhaps someone deleted some archive files from the file system. The only way around this for the failing devices is to remove them from RME then re-add them.

jschweng Wed, 06/04/2008 - 10:44

I will try to remove them from RME and re-add them. To remove the device from the database, do I just delete them from RME Device Management? Thanks for your help.

rperrelli Mon, 06/09/2008 - 07:48

can you do this with the entire config difference report also? I am looking to take entire configs and show the differences from certian dates. Similar to this but to then email them to certian recipients. I understand that this is not native to cisco works... or may it be in newer versions?

Joe Clarke Mon, 06/09/2008 - 08:16

RME has the ability to show diffs between arbitrary config revisions. You can do this from RME > Config Mgmt > Archive Mgmt > Compare Configs.

Actions

This Discussion