LooT Manuals
Deutsch

Exchange

Back up, transfer and restore subtrees as archives – by download, as an imported copy, or with scheduled Exchange jobs.

What Exchange is for#

Exchange backs up and transfers subtrees: a node with all its child nodes. The result is an archive (a ZIP file ending in .loot-exchange.zip). Typical tasks:

  • Backup and restore: regular snapshots from which you bring a state back.
  • Copying: import a subtree as a new copy, repeatedly if you like, into another tenant or onto another LooT instance.
  • Transferring: move structure, configuration and values from one instance to another.

Exchange is not a tool for analysis. If you only want values for a spreadsheet, Python or R, use Value export.

Open Exchange in the rail. At the top, Choose node … selects the root of the subtree; export and Exchange jobs refer to it. The import area chooses its own target.

The Exchange page
The Exchange page with subtree, export, jobs and import.

What an archive contains#

An archive contains:

  • the structure and configuration of the subtree: nodes, links, aliases, connections and template references,
  • the time series values (per node and month), including file and stream contents,
  • optionally the permissions of the nodes in the subtree,
  • commands, component usages with their bindings, and data source assignments.

The archive does not contain the components themselves, data sources, templates or users. They must already exist in the target. The dry run reports what is missing: missing data source assignments and template references are skipped and named in the report, while a component usage without a matching component is an error (turn off Components in that case). The archive is not encrypted: treat it like the data itself.

Dependencies#

If the subtree points to nodes outside it (links, connections), the export takes these nodes along by default (Include dependencies), individually and with their properties only. Only what you may read is taken. A preview tells you the number of dependencies and the estimated size beforehand.

Exporting#

  1. Choose the subtree (Choose node …).
  2. Set the options:
    OptionEffect
    Include time series valuesValues from and Values to (local time; "to" is exclusive) limit the period. Without the tick, structure only
    Include dependenciesSee above
    PermissionsTake the permission entries of the nodes along. Only for those who may manage permissions on the root
    Commands, Components, Data source assignments, Template referencesParts outside the node structure, on by default
  3. Click Export. The browser downloads the archive.

You need Read on the root; unreadable nodes in the subtree prevent the export. Only Chrome and Edge write large archives directly into the file; other browsers hold them in memory. For very large subtrees, use the command line.

Importing#

In the import area you choose the archive (Archive file, up to 1 GiB), a stored snapshot (Load stored archives) or, as a system admin, an archive of another instance stored on this one. Then you choose the kind of import:

KindEffect
Import as copyNew nodes with new identities are created under the chosen target node (or at the tenant's top level). The original stays untouched, and you can import repeatedly. You give the name of the new root yourself; if it is taken, LooT numbers it (Name (2)). You need the permission to create nodes at the target
Restore originalIdentities are kept, missing nodes are created again. Tenant admins and system admins only

The options correspond to those of the export; in addition there is Import aliases (on by default). Aliases are unique in the tenant: if one is already taken in the target, the import aborts and the report names every conflict. If a node's retention class is missing in the target, the node gets "unlimited" and the report warns you.

Always dry run first#

Click Dry run first. It writes nothing and produces a report: what would be created, what is skipped (with reason) and warnings. Import becomes available only once the dry run has run with exactly your current choices and reports no errors. Large archives then run as a job with progress; cancelling deletes the copy created so far. Until it finishes, the subtree being created is visible but read-only.

Restoring#

When restoring, existing nodes with the same identity are left untouched at first. There are two far-reaching options:

  • Overwrite existing nodes with the same GUID (align): names, description, unit, connections and other properties are aligned with the archive. The import never changes value type, stream format or retention class.
  • Delete children under the root that the archive does not know: cleans up the subtree (requires "overwrite").

Neither can be undone. That is why Restore stays locked until you tick I understand: …. Values are imported idempotently: equal timestamps overwrite each other, so running twice does no harm.

Permissions on import#

Permissions are not taken over by default; the copy inherits from the target, as when cloning. Entries are imported only on explicit request and only if you may manage permissions at the target. Users are matched by their identity and groups by group name in the target tenant. Under Subject mapping you assign others (user:old=new or group:Old=New, one per line). What cannot be matched is discarded; LooT creates neither users nor groups. Anyone who is not an admin sets only entries within their own permissions. The report shows per subject what was assigned and what was discarded.

Exchange jobs: back up regularly#

An Exchange job backs up a subtree to a target on a schedule. It runs in the Exchange server, a service of its own; if it is not set up, the section shows only a note, and export and import still work.

Targets#

A target is a storage location of the operator. There are three kinds:

  • Local folder under a fixed root location,
  • Object storage (S3-compatible) with a prefix,
  • Foreign instance (push): an archive is sent to another LooT instance. You give the address of the target instance, the realm URL and the client id of a service account with the role loot-exchange-store, and the name of the secret. The secret itself is never in the database but in the Exchange server's configuration.

Only system admins create and delete targets (Create target); everyone sees the list, but only system admins see location and address. A target can be deleted only while no job uses it.

Creating a job#

With New job you set:

FieldMeaning
Job name, TargetLabel and chosen target
IntervalFor example 30m, 6h, 1d; at least 5 minutes
Fixed time of dayFor whole days, optionally a time (HH:mm, UTC)
Back up time series values, Back up dependencies too, Back up permissionsAs for the export
RetentionKeep last N snapshots and/or Keep snapshots of the last N days. The newest always stays. Without a setting, everything stays

A job always includes commands, components, data source assignments and template references, as far as the owner's permissions reach. The preview appears automatically once node and target are set. To create a job you need Read and Manage on the root.

Runs and snapshots#

Every run produces a snapshot. Follow-up runs are incremental: they store structure and file contents completely, but of the values only new or changed months. That saves space. When downloading or importing, LooT assembles the chain into one complete archive. Old snapshots are deleted according to the retention, but only when no other snapshot still refers to their parts.

The job list shows Next run and status. Now starts a run immediately (on the Exchange server's next pass), Deactivate and Activate switch the schedule, Runs and Snapshots show the results. Import … on a snapshot takes it over into the import area. The job runs on behalf of its owner; the owner and tenant admins manage it.

Command line#

loot exchange does the same (export, import, restore, verify, targets, jobs): see Exchange on the command line.

A product of Rheinwert Datentechnik · rheinwert.deVersion: LooT 0.9.10