Value archive
The archive keeps the history of values for trends and reports. Only the variables you mark are written — so the disk is not filled with what nobody looks at.
What is archived
- A protocol or local variable — the Write to archive checkbox in its window, or the To archive button for the rows ticked in the table.
- An object variable — the Archive column in the type (for all objects of the type) or the checkbox of a specific object's variable.
- A trend with a variable without archive offers to turn the archive on with one button.
- String variables are not archived.
How it is written: variable settings
When “Write to archive” is on, the variable window shows the recording settings (per OPC UA Part 11). An empty field means the default of the chosen archive (it is shown in grey in the field).
| Setting | Values | Meaning |
|---|---|---|
| Archive | the server archives: “Main” and your own groups | which group to write to — groups have their own retention. Under the field: how long data is kept and how long the hourly values |
| Archive deadband | a number in the variable units or in % of the range (the “units” / “% of range” switch) | a smaller change is not written. The main way to reduce the volume: 0.1 bar for a 0…16 bar pressure — dozens of times fewer records without losing meaning |
| Not more often than, s | seconds; default 1 s | within this period the last value is written — fast fluctuations do not flood the archive |
| Not less often than, min | minutes; default 10 min | a constant value is still written once per period — the trend shows the connection was there |
Server archives
The Archives section in the tree (under the server) and in the admin panel shows the server archives: how many variables are written, volume, depth and free space. An archive group has its own retention and its own defaults for the deadband and intervals. For example: “Metering” — 5 years for meters, “Process” — 90 days for fast signals.

| Archive setting | Values | Meaning |
|---|---|---|
| Archive | text | the name — the archive is chosen by it in a variable |
| Id | Latin letters | the archive code in the files; the main one is main |
| Keep, days | default 90 | how long exact values are kept; older ones are deleted |
| Limit, GB | default 20 | how much disk the archive may take; at the limit the oldest days are deleted (the “Trimmed by limit” column) |
| Deadband, % of range | default 0 | the default deadband for the archive variables |
| Not more often than, s | default 1 | the default “not more often” interval |
| Not less often than, min | default 10 | the default “not less often” interval |
| Hourly, days | default 1095 | how long hourly values (average, min, max) are kept — for reports and trends over years |
Add archive — a new group, Save archives — apply. The “Archives on disk” table shows for each: how many variables are written, the space taken, the daily volume before compression, how many days the space will last (“Fits”), the compression ratio. The Write history to disk checkbox turns writing off completely (memory only).
How it is stored
Values first accumulate in memory and once a second are written to the write journal on disk — a power loss loses at most a second. Then the journal is laid out into daily files and compressed (several times smaller than the original); compression runs in the background and does not disturb trends. “Recording gaps” show whether the archive has been continuous. With server redundancy the archive is backfilled from the pair for the downtime.
Besides the disk there is in-memory history: the last 36,000 points of every archived variable — from it a trend instantly shows the last hour. The server takes the memory for it at start-up: 17 bytes per point, so 2,000 variables × 36,000 points ≈ 1.2 GB, and occupies it as points are written (the server's working set grows during the first hours — that is the ring filling up, not a leak). The ceiling is in the project's historian settings (2,048 MB by default): on a large project the ring becomes shorter by itself.
A volume estimate: a variable that changes once a second, without a deadband — about 1 MB a day before compression. With a deadband and “not more often than 5 s” — 10–50 times less.
Writing to external databases
For MES, ERP, BI and enterprise reports the project also writes data to the enterprise database: PostgreSQL (and Postgres Pro), MS SQL Server, ClickHouse, InfluxDB (1.x and 2). The project's own archive does not depend on it. Connections are in the project tree, the Databases section; a new one — right-click the project root → Create ▸ → Database connection (requires the Administration right).
| Field | Meaning |
|---|---|
| Name | the connection name in the project — it is chosen at the variable |
| Database type | PostgreSQL / Postgres Pro, MS SQL Server, ClickHouse, InfluxDB; default ports 5432, 1433, 8123, 8086 |
| Write to this database | off — the connection exists but does not write |
| Server address, Port | MS SQL — an instance works too: server\SQLEXPRESS |
| Database | InfluxDB 2 — the bucket, 1.x — the database |
| User, Password | InfluxDB 2 — organisation and token; MS SQL without a user — Windows sign-in (the Flexible SCADA service account). The password is stored encrypted with the server key; when the project moves to another server the password is entered again |
| Encryption (TLS / HTTPS) | a protected channel to the database; “Trust the database server certificate” — for an MS SQL server's own certificate |
| Additional | connection string parameters for PostgreSQL and MS SQL: Key=Value;… |
| What to write | variable values (those marked “Write to the database”), alarms (raised, cleared, acknowledged, shelved), the audit log (who changed what and when); each into its own table |
| Create tables if they do not exist | needs the CREATE right; without it the database administrator creates the tables by the pattern below |
| Keep in the database, days | older rows are deleted hourly; 0 — keep everything. ClickHouse — the table TTL, InfluxDB — the bucket retention |
| When to write (default for variables) | “on change (deadband)” or “every period”; how often to check, the deadband in the variable's units, “Not less often, min” — a constant value is still written every N minutes |
| Queue | rows in one insert; disk buffer, MB — with no connection to the database rows accumulate here and are written later |
A variable can have its own settings: the variable window → Processing → Write to the database (connection, when to write). Test connection connects and shows the database version.
Tables (the names can be changed in the connection):
| Table | Columns |
|---|---|
scada_values — values | ts (time, UTC), server, project, tag, value (number), text (string value), quality; index on (tag, ts) |
scada_alarms — alarms | ts, server, project, alarm_id, name, event (raised, cleared, acknowledged…), priority, area, object, message, value, username, note |
scada_audit — audit log | ts, server, project, username, ip, action, target, details, ok, error |
The server column lets several servers write into one database. The connection list shows the link state, what is written, how much, per minute, the queue and the disk buffer, rows lost, the last error. Only the active server of a redundant pair writes; an engineering station in “Engineering without plant connection” mode and the program's development server (“This computer — development”) do not write at all. PostgreSQL receives values with COPY — thousands of rows per exchange.