# The Server Component

The normal backup that you perform for your server instance will also take care of backing up Composable Agentic Platform code components.

However, if you are performing a selective backup, you must make sure you include the server's HOME folder in the backup.

During a restore, the HOME folder should be restored in synchronization with the application server restore.

## Per-Agent state under HOME

Each Programmable Data Agent (PDA) running on the server has its own directory under `HOME/` named after the Agent (for example `HOME/TestServer1/`, `HOME/LocalProxy/`, `HOME/MPServer1/`, plus any custom Agent names). Each of these directories contains:

* `ActiveRules.xml` — the deployed rule configuration the Agent is running.
* `metadata` — the encryption key material used to decrypt sensitive fields within `ActiveRules.xml` (proxy passwords, mail credentials, JDBC passwords, vault values).
* Other runtime state such as `global.properties`, `backups/`, and Agent-specific subdirectories.

**The `metadata` file inside each Agent directory must be backed up alongside the Agent's `ActiveRules.xml`.** Without the matching `metadata`, the encrypted fields in `ActiveRules.xml` cannot be decrypted and the Agent will not operate correctly.

A selective backup that captures the whole `HOME/` directory includes all per-Agent state automatically. If you back up individual files, ensure both `ActiveRules.xml` and `metadata` are captured for every Agent.

## Restore considerations

* Restore `HOME/` and the server install directory as a matched pair from the same backup snapshot.
* For each Agent's directory, `metadata` and `ActiveRules.xml` must be restored together. Mixing `metadata` from one snapshot with `ActiveRules.xml` from another will produce decryption failures at runtime.
* `metadata` files carry file permissions that restrict read access to the service user. When restoring to a different host, re-apply ownership and permissions (`0600`, owned by the service user on POSIX; equivalent ACLs on Windows).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tomorrowx.com/cap/product-reference/backup-and-restore/the-server-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
