# Architecture

## Overview

Through DeviceLink, Copia provides the ability to back up projects and files either on-demand or through scheduled operation. Using the Copia Web App, users of DeviceLink can configure their Projects and Devices for backup with a client-side app called the Copia Agent.

The example below demonstrates how an Organization might configure two Sites for DeviceLink:

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FHT6xXGEfSJi8u5kCBN74%2FMisc_SiteDiagramArchitecture.png?alt=media&#x26;token=a45934c4-6f09-4cc4-9f8b-46c5705e938d" alt=""><figcaption></figcaption></figure>

As seen above, the Copia DeviceLink system consists of the following items:

* **Site**

  A Site is a logical grouping of user-defined Projects, Devices and Agents. A Site could be home to a factory, an area with a factory, a large region, etc.
* **Project**

  Projects are pointers to specific automation projects which are stored in the repositories within an Organization.
* **Device**

  Devices represent the actual hardware device(s) or location(s) that Projects are backed up from (i.e. PLC's, robot controller, etc). They often contain communication information, like an IP address.
* **Job**

  A Job is a scheduled operation that is used to perform a backup and comparison of your Project to the current instance in the Copia Server.
* **Agent**&#x20;

  An Agent is a piece of software that will perform or request the actual backup of the Device directly. This is downloaded and installed on a PC in the customer network which has access to perform this operation.

## What is the Copia Agent?

The Copia Agent is a small client-side application that enables DeviceLink to back up the code running on customer devices to Copia's Git-Based Source Control product.

The Agent works through a specific set of operations:

* The Agent will poll for Jobs from the Copia Web App via HTTPS at a polling interval of approximately 15 seconds.
* If any Jobs are found, the Agent will attempt to communicate to the Device to perform the backup.
* If the backup is successful, the program on the Device will be saved to disk in a temporary folder on the system. Prior to the next backup, the program will be deleted from local storage.
* If the backup is successful, the Agent will upload the results to the Web App via HTTPS.

![](https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2F24uoUTaE4k7tM83e8Kt1%2FMisc_ArchitectureSimplified.png?alt=media\&token=96458aa2-9eeb-475a-bbf7-7e6b301d3096)

{% hint style="info" %}
Agent Network & System Requirements can be found in the [**System Requirements**](https://docs.copia.io/docs/overview/system-requirements#os-support-1) section of the Documentation.
{% endhint %}
