> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexxible.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Local persistence

**Local persistence** keeps a queryable history of FlexxClient [Audit](https://docs.flexxible.com/en/features/traceability/audit.md) and [Operations](https://docs.flexxible.com/en/features/traceability/operations/operations) records in your organization's infrastructure. It lets you define how long they are kept and query the archived information even when it is no longer available in the SaaS service.

The component is installed on a customer virtual machine and downloads the data through the [API](https://docs.flexxible.com/en/features/integrations/api.md). FlexxClient SaaS continues to manage and run the actions; the local component keeps their history and makes it easier to query and export.

## What information it keeps

| Information | Content |
| - | - |
| **Audit** | Actions on entities, the user or process that originates them, dates, affected object and the change details received from the service. |
| **Operations** | Operation identification and status, events, related devices, results and execution outputs of actions, flows and microservices. |
| **Archive activity** | Imports, covered intervals, errors and retries, retention changes, exports and authorized deletions. |

> [!NOTE]
>
> The scope covers the information exported by these sources. Direct reception of FlexxAgent logs or telemetry is not part of this feature. Execution outputs that are already part of an operation are included in its history.

## How it works

1. **Initial import.** Retrieves the history that is still available in the SaaS and shows from which date coverage exists for each source.
2. **Nightly synchronization.** Downloads pending records and their details by date intervals. Keeps the events and versions received, incorporates updates to records already imported and reviews open operations.
3. **Confirmation and recovery.** Confirms each batch once its data is saved. If a download is interrupted, it resumes the work without duplicating records and shows incomplete intervals.
4. **Local query.** Updates searches and daily summaries. The full detail is loaded when each record is opened.

> [!NOTE]
>
> The archive reflects the last completed synchronization. With a daily run it may lag by about one day, plus the processing time. A failure can extend that interval.

## Deployment and configuration

The synchronizer, the query service and the repository are deployed on a VM with persistent, expandable storage. In higher-load installations, the application and the database can be hosted on separate servers.

### Deployment requirements

* **Connectivity and credentials.** Outbound HTTPS connection from the component to the FlexxClient API and a technical identity of the organization with the necessary read permissions.
* **Access.** Access to the local interface from the authorized network and authentication for users who query or administer the archive.
* **Storage.** SSD or equivalent low-latency storage, with free space for the import, indexes and maintenance.
* **Backups.** An independent backup destination and a recovery policy defined by the organization.

### Main settings

| Setting | Purpose |
| - | - |
| **Organization and credential** | Select the source and authorize reading its records. |
| **Schedule** | Define the time and time zone of the daily synchronization. |
| **Retention** | Set the periods per category and the applicable minimum retention periods. |
| **Access and monitoring** | Assign permissions and configure notifications for errors, delays, lack of space or incomplete coverage. |

## Querying the history

The views let you filter by dates and identifiers and, depending on the record, by actor, device, action, status, flow or microservice. Results are paginated and large exports are processed in the background.

Each view shows the covered period and the last successful synchronization. The history remains queryable during a SaaS outage if the local component and the configured authentication services are working.

## Retention and protection

Retention is configured in months or years:

* **Audit.** The period is counted from the event.
* **Operations.** The period is counted from the closing or the last change, whichever is later. Open operations are kept.

The profile prevents deleting records before the applicable minimum and lets you block their deletion during an investigation.

Local purging follows the authorized policy and is logged; it is not triggered by a deletion in the SaaS. Permissions separate querying, exporting and administration. Protect communications, data and backups according to your organization's security policy.

## Indicative sizing

Sizing depends on daily operations, the size of their related data, audit, retention and concurrent queries. The number of devices helps describe a scenario, but it is the actual activity that determines the resources.

### Assumptions of the examples

* **Activity and retention.** Five new operations per device per day and five years of retention, calculated as 1,825 days. This is a planning assumption, not an average product usage figure.
* **Unit of calculation.** One operation corresponds to one record in the Operations history. An action on several devices can produce many associated results.
* **Size per operation.** Approximately 22.6 kB of physical storage per operation, including events, associated details and indexes. Replace this value with the measurement from your organization's local archive.
* **Queries.** Paginated queries, daily summaries and between five and ten concurrent query users. Resources are validated through a test with representative data.

| Reference devices | Operations per day | Data and indexes at 5 years | Initial usable SSD | Indicative vCPU and RAM |
| - | - | - | - | - |
| 1,000 | 5,000 | 0.21 TB | 0.5 TB | 4 vCPU / 16 GB |
| 5,000 | 25,000 | 1.03 TB | 2 TB | 8 vCPU / 32 GB |
| 10,000 | 50,000 | 2.06 TB | 4 TB | 8 vCPU / 64 GB |
| 25,000 | 125,000 | 5.16 TB | 10 TB | 16 vCPU / 128 GB |
| 50,000 | 250,000 | 10.32 TB | 20 TB | To be sized |
| 100,000 | 500,000 | 20.64 TB | 40 TB | To be sized |

> [!WARNING]
>
> The figures are planning estimates, not certified capacity limits. GB and TB are expressed in decimal units. Usable capacity is the capacity available to the service after infrastructure reservations.

The data column includes operations and their associated details. Audit, additional versions and the engine's operating space must be measured separately. The initial SSD includes a planning reserve whose sufficiency must be checked when adding those items.

The operating system disk, backups and replicas require additional capacity. For 250,000 daily operations or more, the CPU and RAM distribution and the separation of services are defined through specific sizing.

In the 50,000 daily operations scenario, 91.25 million operations are kept over five years. The reference configuration is 8 vCPU, 64 GB of RAM and 4 TB of expandable usable storage, subject to validation with the actual load.

### Adjust capacity to your organization

1. **Measure activity.** Use a representative period of two to four weeks. Record the operations and bytes archived each day, including results, audit and new versions. Include days with high activity.
2. **Project retention.** Multiply the measured daily growth by the retention days and by the expected activity growth. Include indexes and the engine's operating space without counting items already measured twice.
3. **Reserve capacity.** Divide the expected total by 0.70 to keep 30% free space. Size backups and replicas independently.
4. **Validate performance.** Check searches and the opening of old records while an import is running. Confirm that the download finishes within the agreed window and adjust CPU, RAM, disk or concurrency if necessary.

As a reference, 50,000 daily operations require about 0.41 TB with one year of retention, 1.24 TB with three years and 2.06 TB with five years, before adding Audit and the other items. If the average size of operations or their results changes, recalculate these values.

## Monitoring and maintenance

Monitor free space, the last successful synchronization, the age of the archive, pending intervals and query times. Expand storage before consuming the planned reserve and review the sizing when retention, activity or concurrent users increase.

Backups must allow data, configuration and synchronization state to be recovered together. Test restoration and agree on how long the archive can be unavailable. A single VM requires additional measures if high availability is needed.

## Related information

* [Audit](https://docs.flexxible.com/en/features/traceability/audit.md)
* [Operations](https://docs.flexxible.com/en/features/traceability/operations/operations)
* [API](https://docs.flexxible.com/en/features/integrations/api.md)
