This document describes useful Subversion (svn) commands for the Cisco Policy Suite (CPS).
Cisco recommends that you have knowledge of Linux Operating System.
This document is not restrictes to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Subversion is a repository that tracks source code. Each version of a configuration is numbered and stored in the Subversion repository history. Therefore, it is possible to revert to any version of a configuration. The Policy Builder does not have a way to do this via the Graphic User Interface (GUI), but by the use of the Subversion command line tools, any version of the configuration can be made the current revision.
Useful Svn Commands
These are commands used to administer svn on pcrfclient01. These are not all of the commands, but it shows the ones typically used with examples.
This command shows a list of the repos available on the system.
svn ls http://pcrfclient01/repos
Here are the run, configuration and starhub_configuration_prod repos.
Look at the log for the svn repo run to see the version
svn log http://pcrfclient01/repos/run
This shows a log of the run repo information. You can see that this is r345 and there is a comment.
Look at the log for all of the svn repos to find previous versions
This imports an svn database stored in local directory exported_data and puts it into a repo named configuration_import_12062014.
Once the database is imported you can edit it and use it in the Policy Builder through these steps.
Step 1. Create a new repo in policy builder.
Step 2. Change the Name to something that identifies the database you have imported, set the URL to the same name as the directory you imported the configuration into and set the username and password.
Step 3. Then click OK. Now you can use PB to edit this set of imported policies and publish them to the CPS.