> 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/kuka-robots.md).

# KUKA Robots

## Overview

KUKA robot controllers running KUKA System Software (KSS) 8.3 or later, such as the KR C4 and KR C5, can be backed up with Copia DeviceLink using the [Scripting](https://docs.copia.io/docs/devicelink/basic/copia-scripting.md) integration. This is a coordinated backup: **KUKA BackupManager**, which runs on the robot controller, automatically saves backup files on the controller, and a Copia Script project picks up the newest file of each type and commits them to the repository.

A BackupManager backup includes the following file types:

| File type | Contents                   |
| --------- | -------------------------- |
| `.asz`    | Controller project backup  |
| `.zkop`   | Option package (KOP) files |
| `.rdc`    | Robot RDC data             |

{% hint style="info" %}
These files are versioned in Copia as complete files. BackupManager does not create WorkVisual projects (`.wvs`). If your site saves WorkVisual projects, save them to the same backup folder and the script below will pick up the newest one as well.&#x20;
{% endhint %}

**Supported versions:** KSS 8.3 and later

## Requirements

Below are the requirements to configure a Copia Agent for the backup of KUKA robot controllers:

* A KUKA robot controller (for example KR C4 or KR C5) running KSS 8.3 or later, with KUKA BackupManager creating backups.
* Network access from the Copia Agent to the controller's BackupManager backup folder
* 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).

## KUKA Controller Configuration

#### Confirm BackupManager backups

1. On the controller, confirm that BackupManager is creating backups, and note the folder it saves them to (`D:\ProjectBackup` by default).
2. Confirm that the folder contains the `.asz`, `.zkop` and `.rdc` files.

#### Share the backup folder

1. On the controller, share the BackupManager backup folder with the name `ProjectBackup`.
2. Grant the Windows account used by the Copia Agent read access to the share.
3. From the Copia Agent, confirm you can open `\\{robot_ip}\ProjectBackup` in File Explorer.

{% hint style="info" %}
Follow your site's and KUKA's guidelines for sharing folders and creating user accounts on the robot controller.&#x20;
{% endhint %}

## Scripts

1. Create a new text file on the Copia Agent in `c:\copia\scripts\` and rename it `kuka_backup.bat`.
2. Edit the file, enter the text below, and save it. The script copies the newest `.asz`, `.zkop` and `.rdc` file (and `.wvs`, if present) from the controller's backup share. File types that are not present are skipped, and the backup fails only if none are found.

```batch
echo Running KUKA Backup Script...
@echo off
setlocal
REM -Setup-------------------------------------------------------------
echo %date% %time% Starting KUKA Backup Script >> %temp%\backup_results\CopiaError.log
set SrcDir=\\%1\ProjectBackup
echo %date% %time% Source folder is: %SrcDir% >> %temp%\backup_results\CopiaError.log

REM -Script: copy the backup files----------------------------------------
set Found=
for %%e in (asz wvs zkop rdc) do (
  if exist "%SrcDir%\*.%%e" (
    copy /y "%SrcDir%\*.%%e" "%temp%\backup_results\" >nul
    set Found=1
  )
)
if not defined Found (
  echo %date% %time% No backup files found in %SrcDir% >> %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 KUKA 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%2Ft0axKAetru0f44t5vNJq%2Fimage.png?alt=media&amp;token=79df1592-da45-4693-8f44-5b611720b668" 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%2FKHQz0WJCdH60fhYGUTJy%2Fimage.png?alt=media&amp;token=e1a2fc37-6132-4c9f-a69b-815e95700f62" 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%2FlA09c8TD9JcRzKuSJyNv%2Fimage.png?alt=media&amp;token=8ab235f1-f6a4-45a4-b0c0-6f4d337fbfd2" 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.&#x20;

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FbYudSrEAjWIsMZBKJXwR%2Fimage.png?alt=media&amp;token=6acc1d0f-a7c6-456e-bce1-d787e5a37d9e" 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%2FTZg1thT3pUZjELnoqADm%2Fimage.png?alt=media&amp;token=6be6c9b3-c8c1-48f9-ac49-d14c55706098" 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\kuka_backup.bat`
* **Script Arguments:** `{robot_ip}` (the controller's IP address or host name)
* **File List:** select an existing file list, or create one with **Name** `KUKA_KSS8`, **Include in Backup** `*.asz`, `*.wvs`, `*.zkop`, `*.rdc`

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2Fc3PvJ57tL1YweScLOpLr%2Fimage.png?alt=media&amp;token=24dfc549-2180-4077-b88d-dd877414fbee" 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%2FOIf8J6Gq5JSu6TUh8utQ%2Fimage.png?alt=media&amp;token=19ae869a-026a-48bb-b785-df0d787302e9" 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/kuka-robots.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.
