> For the complete documentation index, see [llms.txt](https://docs.copia.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.copia.io/docs/devicelink/basic/cisco-catalyst-ie-switches.md).

# Cisco Catalyst / IE Switches

## Overview

Cisco Catalyst and Industrial Ethernet (IE) switches and routers can be backed up with Copia DeviceLink using the [Scripting](https://docs.copia.io/docs/devicelink/basic/copia-scripting.md) integration. A script on the Copia Agent connects to the device over SSH, saves the output of `show running-config`, and Copia commits it to the repository for change detection.

**Supported versions:** IOS / IOS XE

## Requirements

Below are the requirements to configure a Copia Agent for the backup of Cisco Catalyst / IE:

* SSH enabled on the switch or router, and network access from the Copia Agent to the device on TCP port 22.
* A device account with privilege level 15 (or a level that can run `show running-config`).
* **PuTTY `plink.exe`** installed on the Copia Agent (for example in `C:\Program Files\PuTTY\`).
* The Agent should be tested to confirm that it can backup the desired files utilizing the script on the Agent.
* The script path must be permitted by the Agent's [Script Path Allowlist](https://docs.copia.io/docs/devicelink/basic/copia-scripting#script-path-allowlist).

## Cisco Catalyst / IE Configuration

#### Confirm SSH access

1. On the Copia Agent, open Command Prompt **as the account the Copia Agent runs under**.
2. Run `"C:\Program Files\PuTTY\plink.exe" -ssh {username}@{device_ip}`.
3. The first time, plink asks you to accept the device's host key. Type `y` to store it. The script runs in batch mode and will fail if the host key has not been accepted.
4. Enter the password and confirm you reach the device prompt, then type `exit`.

{% hint style="info" %}
Script Arguments only allow letters, numbers, `.`, `-` and `_`. Device credentials are therefore stored in the script, not passed as arguments. Restrict access to the script folder on the Agent.&#x20;
{% endhint %}

### Scripts

1. Create a new text file on the Copia Agent in `c:\copia\scripts\` and rename it `cisco_backup.bat`.
2. Edit the file, enter the text below, update the username and password, and save it.

```batch
echo Running Cisco Backup Script...
@echo off
REM -Setup-------------------------------------------------------------
set DeviceIP=%1
set CiscoUser={username}
set CiscoPass={password}
set Plink="C:\Program Files\PuTTY\plink.exe"
echo %date% %time% Starting Cisco Backup Script for %DeviceIP% >> %temp%\backup_results\CopiaError.log

REM -Script------------------------------------------------------------
%Plink% -ssh -batch -pw %CiscoPass% %CiscoUser%@%DeviceIP% "show running-config" > %temp%\backup_results\running-config.txt
if errorlevel 1 (
  echo %date% %time% SSH connection or command failed >> %temp%\backup_results\CopiaError.log
  exit /b 1
)
echo %date% %time% Completed Backup Command >> %temp%\backup_results\CopiaError.log

REM -Remove Error Log = It worked!-------------------------------------
del %temp%\backup_results\CopiaError.log
exit
```

Create the script on the Copia Agent and add its path to the Agent's [Script Path Allowlist](https://docs.copia.io/docs/devicelink/basic/copia-scripting#script-path-allowlist). This only needs to be done once per Copia Agent.

The script follows the [Copia Scripting](https://docs.copia.io/docs/devicelink/basic/copia-scripting.md) requirements: results are placed in `%temp%\backup_results\`, and `CopiaError.log` is deleted only when the backup succeeds. Test the script from the command line on the Agent before configuring the project.

## Project Configuration

Script projects require a File List to determine what files in the %temp%\backup\_results folder to include and exclude, as well as the contents to exclude from the compare. More information can be found in [File List](https://docs.copia.io/docs/devicelink/sitesandagents/sites/file-lists.md) section.

To configure a Cisco Catalyst / IE project, you need a repository with a Project folder to store the data. The name of the folder is usually similar to that of the device.

Click either of the *Add a Project* buttons in the Projects tab.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2F4vv761FT38KPSPPqWy86%2Fimage.png?alt=media&amp;token=e7cf82ba-d090-46f7-894f-489aebed0099" alt=""><figcaption></figcaption></figure>

The *Add a new project* configuration dialog will appear which allows you to fully configure the project, devices and job for the project.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FBI1iurswHepk23aL7Kgc%2Fimage.png?alt=media&amp;token=c2757ef0-ba4e-4c8a-9910-c5b01f83bf0b" alt=""><figcaption></figcaption></figure>

#### Define the Project

To get started, select **Script** as the *Project Type*, and then select an *Agent*. See more about this in the [Agents ](https://docs.copia.io/docs/devicelink/sitesandagents/agents.md)section of the documentation.

When complete, press *Save and Continue*.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FQMjSqO2uw5jgGQH7z11L%2Fimage.png?alt=media&amp;token=f1988f71-7711-47c7-83b8-8701b29f2c5a" alt=""><figcaption></figcaption></figure>

You will now select the Project Path, which is the location (Repo/Branch) that the project is, or will be stored.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FUfH7sykwKxjnumsqLQqw%2Fimage.png?alt=media&amp;token=607ce7ef-cdff-4008-a1a6-151162d4ffdb" alt=""><figcaption></figcaption></figure>

You can either select an existing folder, or create a new empty folder. Once complete, press *Save and Continue* to proceed.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2F42pY7lr26B1rBXnRHr36%2Fimage.png?alt=media&amp;token=d2e97dfd-01e8-4307-a768-265ed288883e" alt=""><figcaption></figcaption></figure>

The project details allows you to update the Project name, and description if desired. You will need to provide:

* **Script Path:** `c:\copia\scripts\cisco_backup.bat`
* **Script Arguments:** {device IP address}
* **File List:** select an existing file list, or create one with **Name** `Cisco_IOS`, **Include in Backup** `running-config.txt`. One File List can be reused for all Cisco devices.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FEeBz3SgyvMIuKZcpEQac%2Fimage.png?alt=media&amp;token=016162bc-6405-454b-a378-d13e6f52d77a" alt=""><figcaption></figcaption></figure>

#### Define the Device

Since the Script exists on the Agent, there is no need to define a Device for Projects that use a Script during setup. You can skip to the Job section.

#### Define the Job

Creating Jobs is similar for all vendor types, and is described in the [Creating Jobs](https://docs.copia.io/docs/devicelink/jobs/creating-jobs.md) section. It is recommended to review that section while completing a job configuration, and press Save to save the job. You can create more than one job for a device if desired.

#### Submit the Configuration

Once complete, press *Submit Project Setup* to create the Project, Device and Job.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FNOFdR73WWAtEC3Dy8mBr%2Fimage.png?alt=media&amp;token=b3e84ab1-9868-40c8-8ce1-fd5edbd75968" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.copia.io/docs/devicelink/basic/cisco-catalyst-ie-switches.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
