Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Try creating assets, agents, rules, users, realms, etc. using the Manager UI, pl
## Where's the data stored?

Persistent data is stored in a PostgreSQL DB which is stored in the `openremote_postgresql-data` docker volume which is durably stored independently of the running containers (see all with `docker volume ls`).
Note that historical attribute data is purged daily based on value of `OR_DATA_POINTS_MAX_AGE_DAYS`; this value can also be overridden for individual attributes by using the `dataPointsMaxAgeDays` configuration item.
Note that historical attribute data is kept indefinitely by default; set `OR_DATA_POINTS_MAX_AGE_WEEKS` to purge data older than the given number of weeks.
See the [Developer Guide](https://docs.openremote.io/docs/developer-guide/system-administration/#backuprestore) for details on making backups of the database.

## OpenTelemetry tracing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
/**
* Store and retrieve datapoints for asset attributes and periodically purge data points using
* TimescaleDB's {@code drop_chunks()} with week-based retention aligned to 7-day chunk intervals.
* Retention defaults to inifinite.
* Retention defaults to infinite.
*/
public class AssetDatapointService extends AbstractDatapointService<AssetDatapoint>
implements ProtocolDatapointService {
Expand Down
10 changes: 6 additions & 4 deletions model/src/main/java/org/openremote/model/value/MetaItemType.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ public final class MetaItemType {
new MetaItemDescriptor<>("storeDataPoints", ValueType.BOOLEAN);

/**
* How long to store attribute values in time series database (data older than this will be
* automatically purged).
* Previously set how long to store attribute values in the time series database (data older than
* this would have been automatically purged).
*
* @deprecated Per-attribute retention is no longer supported. Purging now uses TimescaleDB
* drop_chunks with a global week-based retention period configured via
* OR_DATA_POINTS_MAX_AGE_WEEKS. This meta item is retained for backward compatibility but has
* no effect.
* OR_DATA_POINTS_MAX_AGE_WEEKS. For backward compatibility, the largest value of this meta
Comment thread
richturner marked this conversation as resolved.
* item across all attributes (rounded up to whole weeks) is used as a minimum for the global
* retention period, so it can only extend how long data is kept for all attributes; it never
* shortens it and has no effect when purging is disabled.
*/
@Deprecated
public static final MetaItemDescriptor<Integer> DATA_POINTS_MAX_AGE_DAYS =
Expand Down
6 changes: 3 additions & 3 deletions profile/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ services:
# relative paths are resolved relative to OR_STORAGE_DIR
OR_KEYCLOAK_GRANT_FILE:

# Configure the default max age for data points stored in the database (individual attributes can use a custom
# value by using the DATA_POINTS_MAX_AGE_DAYS AssetMeta item).
# OR_DATA_POINTS_MAX_AGE_DAYS: 30
# Configure the max age in weeks for data points stored in the database; data points are kept indefinitely when
# not set. The deprecated OR_DATA_POINTS_MAX_AGE_DAYS is still used (rounded up to weeks) when this is not set.
# OR_DATA_POINTS_MAX_AGE_WEEKS: 4

# Configure the limit of data points that can be queried.
# Defaults to 100.000. When set to 0, it disables the limit.
Expand Down
Loading