Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Useful Svn Commands

Introduction

This document describes useful Subversion (svn) commands for the Cisco Policy Suite (CPS).

Prerequisites

Requirements

Cisco recommends that you have knowledge of the Linux Operating System.

Components Used

This document is not restricted 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.

Background Information

Svn is a repository that tracks source code. Each version of a configuration is numbered and stored in the svn 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 svn command line tools, any version of the configuration can be made the current revision.

Useful Svn Commands

These commands are used to administer svn on pcrfclient01. These are not all of the commands, but only the ones that are 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.

svn log http://pcrfclient01/repos

Export the run repository svn database.

svn export http://pcrfclient01/repos/run run_config

This exports the current svn database to the local directory run_config.

Export an svn database from repos other than run.

svn export -r 343 http://pcrfclient01/repos/configuration export_config

This exports the database r343 from the configuration repo to the local export_config directory.

Import an svn database:

svn import exported_data http://pcrfclient01/repos/configuration_import_12062014 -m 'import description'

This imports an svn database stored in the 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 repository 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.

.