LooT Manuals
Deutsch

Exchange

Back up subtrees as an archive, import them as a copy or restore them, and create backups on a schedule with Exchange jobs.

What Exchange is for#

Exchange saves a subtree – a node with everything below it – as a single archive file (*.loot-exchange.zip). The archive contains structure, aliases, tags, links, exposures, layouts, connections, values, commands, components, data source assignments and template references. From an archive you can

  • import the subtree as a new copy (loot exchange import; every node gets a new identifier),
  • restore the subtree with its original identifiers (loot exchange restore; tenant admins and system admins only),
  • move it to another LooT installation.

For regular backups you create Exchange jobs: a job exports a subtree on a schedule into a target (a folder, object storage or another LooT installation) and keeps a configurable number of snapshots. The workbench side is described in the Exchange chapter of the workbench manual; this page shows the same functions as commands.

Which commands need which server#

CommandsNeed
loot exchange preview, loot exchange export, loot exchange import, loot exchange restore, loot exchange import-job get, loot exchange import-job cancelonly the normal sign-in (loot login)
loot exchange verifyno server at all: the check runs locally on the file
loot exchange target …, loot exchange job …, loot exchange run, loot exchange runs, loot exchange snapshots, --snapshot on import and restorethe Exchange server, which executes the jobs
loot exchange store …the Exchange server of the installation; system admins only

loot derives the address of the Exchange server from the address of the query server (query. becomes exchange., see Configuration). If no address can be derived, these commands end with a notice and exit code 2. Export and import work regardless.

Common rules#

  • Paths are written as everywhere in LooT: Brewery/Plant.Line1 – the tenant, a slash, then the nodes separated by dots. See loot node for details.
  • Timestamps (--from, --to) are ISO 8601, for example 2026-01-01 or 2026-01-01T00:00:00Z. Without a time zone your local system time applies, with the global option --utc UTC. --from includes the instant, --to excludes it (interval [from, to)).
  • Parts of the archive can be switched off with four options. They work the same for loot exchange export, loot exchange import and loot exchange restore (on export: do not save, on import: do not apply):
OptionEffect
--no-commandsleave out commands (definitions, parameters, visibility, connections)
--no-componentsleave out components and their bindings
--no-data-sourcesleave out assignments of data points of external sources
--no-templatesleave out references to templates
  • Errors appear as Fehler: … (German for "error") on the error output. Exit code 0 means success, 1 a rejection by the server or the data, 2 a wrong invocation or missing configuration (Configuration).

loot exchange preview#

Shows before the export roughly how large the archive will be.

text
loot exchange preview <path> [--no-values] [--no-dependencies]
OptionMeaning
<path>Path of the root node, e.g. Brewery/Plant
--no-valuesCalculate without values
--no-dependenciesCalculate without dependencies
console
$ loot exchange preview Brewery/Plant
Vorschau: 214 Nodes im Teilbaum, 6 Abhängigkeiten (2,8 % aller Nodes im Archiv), 48210937 Werte
Geschätzte Größe: 96412305 Bytes komprimiert, 611203114 Bytes unkomprimiert (grobe Schätzung, ohne Blob- und Stream-Inhalte)

Dependencies are nodes outside the subtree that the subtree refers to (for example through links or connections). They are saved along as far as you may read them. The line "Weggelassen" (omitted) names the unreadable and the unsupported ones.

loot exchange export#

Saves a subtree as an archive file and checks it immediately afterwards.

text
loot exchange export <path> [-o <file>] [--no-values] [--from <time>] [--to <time>] [--with-rights] [--no-dependencies] [--no-commands] [--no-components] [--no-data-sources] [--no-templates]
OptionMeaningDefault
<path>Path of the root node–
-o, --output <file>Target file<node>-<timestamp>.loot-exchange.zip in the current directory
--no-valuesstructure only, without valuesvalues are saved
--from <time>only values from this instant on (inclusive)all
--to <time>only values before this instant (exclusive)all
--with-rightsalso save the permissions of the nodespermissions are not saved
--no-dependenciesdo not save nodes outside the subtreereadable dependencies are saved along
--no-commands, --no-components, --no-data-sources, --no-templatesleave out parts (see above)everything is saved

As a tenant admin, system admin or with the Manage right on the root, --with-rights saves all permissions of the subtree. Without that standing it saves only the entries on nodes where you hold Manage yourself; the archive lists the rest as "not managed".

console
$ loot exchange export Brewery/Plant -o plant-2026-11.loot-exchange.zip --from 2026-01-01
Exportiert: /home/alice/plant-2026-11.loot-exchange.zip
Archiv 6f1c0b3e5a2d4c7e9d1f8a2b3c4d5e6f von loot.example.org, erstellt 2026-11-30T09:12:44.318000+01:00
Inhalt: 214 Nodes, 12 Links, 3 Exposures, 5 Verbindungen, 8 Layouts, 4 Aliase, 17 Tags, 31204118 Werte in 1284 Segmenten, 0 Blob-/Stream-Inhalte (0 Bytes), 0 Stream-Sitzungen, 6 Abhängigkeiten
Größe: 71230411 Bytes komprimiert, 452118772 Bytes unkomprimiert
Prüfung: in Ordnung

loot exchange verify#

Checks an archive locally: format version and checksums of all parts. No server is needed; the archive is neither uploaded nor changed.

text
loot exchange verify <file>
ArgumentMeaning
<file>Archive from loot exchange export
console
$ loot exchange verify plant-2026-11.loot-exchange.zip
Archiv 6f1c0b3e5a2d4c7e9d1f8a2b3c4d5e6f von loot.example.org, erstellt 2026-11-30T09:12:44.318000+01:00
Inhalt: 214 Nodes, 12 Links, 3 Exposures, 5 Verbindungen, 8 Layouts, 4 Aliase, 17 Tags, 31204118 Werte in 1284 Segmenten, 0 Blob-/Stream-Inhalte (0 Bytes), 0 Stream-Sitzungen, 6 Abhängigkeiten
Größe: 71230411 Bytes komprimiert, 452118772 Bytes unkomprimiert
Prüfung: in Ordnung

If the archive is damaged or too new for your program version, the command ends with an error and exit code 1.

loot exchange import#

Imports an archive as a new copy. Every node gets a new identifier, references inside the archive are rewritten. The original stays untouched, and you can import the same archive repeatedly.

text
loot exchange import (<file> | --snapshot <nr>) --under <place> [--as <name>] [--no-values] [--from <time>] [--to <time>] [--no-aliases] [--dry-run] [--no-wait] [--with-rights [--map <file>]] [--dependencies copy|bind|skip] [--bind <guid>=<path>] [--no-commands] [--no-components] [--no-data-sources] [--no-templates]
OptionMeaningDefault
<file>Archive from loot exchange export– (either a file or --snapshot)
--snapshot <nr>a snapshot of an Exchange job instead of a file (number from loot exchange snapshots)–
--under <place> (required)Target: path of a node, or name or number of a tenant (the copy then becomes a root node)–
--as <name>Name of the copy's rootname in the archive; on a name conflict Name (2), Name (3) …
--no-valuesimport the structure onlyvalues are imported
--from <time>, --to <time>restrict values to a time intervalall
--no-aliasesdo not import aliasesaliases are imported; the import aborts if one is already taken in the tenant
--dry-runshow only the report, create nothing–
--no-waitdo not wait for the end of a background importwaits and shows progress
--with-rightsalso import the permissions of the archivepermissions are not taken over; the copy inherits from its target
--map <file>mapping of users and groups old → new (only with --with-rights)–
--dependencies <mode>how to treat dependencies: copy, bind or skipcopy
--bind <guid>=<path>bind one dependency to a specific node; repeatable–
--no-commands, --no-components, --no-data-sources, --no-templatesdo not import partseverything is imported

Always try --dry-run first: the report names conflicts, size, parts not included and affected users and groups without creating anything.

console
$ loot exchange import plant-2026-11.loot-exchange.zip --under Brewery --as "Plant (copy)" --dry-run
Trockenlauf: Archiv 6f1c0b3e5a2d4c7e9d1f8a2b3c4d5e6f von loot.example.org (Plant) -> Brewery
Inhalt: 214 Nodes, 12 Links, 3 Exposures, 5 Verbindungen, 4 Aliase, 17 Tags, 31204118 Werte, 0 Blob-/Stream-Inhalte (0 Bytes), 0 Stream-Sitzungen
Größe: 71230411 Bytes komprimiert, 452118772 Bytes unkomprimiert
Abhängigkeiten: 6 im Archiv
  Abhängigkeit 'Weather' (b2d4…): copy als 'Weather'
Kommandos: 4 im Archiv, 4 würden eingespielt, 0 entfallen

Then the actual import:

console
$ loot exchange import plant-2026-11.loot-exchange.zip --under Brewery --as "Plant (copy)"
Import 17 gestartet: 31204332 Elemente werden im Hintergrund eingespielt.
Import 17: 5120000 von 31204332
Import 17: 18874000 von 31204332
Import 17: abgeschlossen, 31204332 von 31204332
Kopie: Node 90412

The server imports small archives at once, and the command ends with the "Import: …" report and a line Angelegt: Node … (created). It checks large archives completely and imports them in the background; the command then shows progress. With --no-wait it returns immediately and names the number of the import (loot exchange import-job). The exit code is 0 only for a successfully finished import.

Dependencies#

If the subtree refers to nodes outside it (dependencies), --dependencies decides:

ModeEffect
copyThe dependencies are created as new nodes next to the root (default on import).
bindReferences go to the node that has the same identifier in the target system. --bind <guid>=<path> selects individual targets.
skipThe references are dropped; the report counts them.

Importing permissions#

By default the archive brings no permissions; the copy inherits the permissions of its target. --with-rights imports the saved permissions (as tenant admin, or with Manage on the target; without that standing LooT discards entries that exceed your own rights). Users and groups that do not exist in the target tenant are discarded. --map assigns them to others. The mapping file is JSON:

json
{
  "users": { "alice": "bob" },
  "groups": { "Brewers": "Operators" }
}

Equivalent and flat: {"user:alice": "bob", "group:Brewers": "Operators"}.

loot exchange restore#

Restores a subtree with its original identifiers. This is the way to bring back a subtree that was changed or deleted by mistake. Only tenant admins and system admins may use it.

text
loot exchange restore (<file> | --snapshot <nr>) --into <place> [--overwrite] [--prune] [--no-values] [--from <time>] [--to <time>] [--dry-run] [--no-wait] [--with-rights [--map <file>]] [--dependencies bind|skip] [--bind <guid>=<path>] [--no-commands] [--no-components] [--no-data-sources] [--no-templates]
OptionMeaningDefault
<file>Archive from loot exchange export– (either a file or --snapshot)
--snapshot <nr>a snapshot of an Exchange job instead of a file–
--into <place> (required)Path of the target node, or name or number of the tenant. If the root is missing it is created there; otherwise it stays where it is–
--overwritealign existing nodes with the same identifier (properties, aliases, tags, links, layouts, connections in the subtree) and add valuesexisting nodes stay unchanged
--prunedelete children under the root that the archive does not know (needs --overwrite)they stay
--no-valuesrestore the structure onlyvalues are restored
--from <time>, --to <time>restrict values to a time intervalall
--no-waitdo not wait for the end of a background runwaits
--dry-runshow only the report (what would be created, aligned and deleted)–
--with-rightsalso restore the permissions of the archive (replaces the permissions of created and overwritten nodes)permissions stay
--map <file>mapping of users and groups old → new (only with --with-rights, format as for import)–
--dependencies <mode>bind or skipbind (node with the same identifier)
--bind <guid>=<path>bind one dependency to a specific node; repeatable–
--no-commands, --no-components, --no-data-sources, --no-templatesdo not restore partseverything

Without --overwrite, restore creates only missing nodes. If names are in the way or an identifier lives in another tenant, the report names a conflict and nothing happens.

console
$ loot exchange restore --snapshot 41 --into Brewery --overwrite --dry-run
Trockenlauf: Archiv 6f1c0b3e5a2d4c7e9d1f8a2b3c4d5e6f von loot.example.org (Plant) -> Brewery
Inhalt: 214 Nodes, 12 Links, 3 Exposures, 5 Verbindungen, 4 Aliase, 17 Tags, 31204118 Werte, 0 Blob-/Stream-Inhalte (0 Bytes), 0 Stream-Sitzungen
Größe: 71230411 Bytes komprimiert, 452118772 Bytes unkomprimiert
Wiederherstellen: 3 angelegt, 211 angeglichen, 0 gelöscht
$ loot exchange restore --snapshot 41 --into Brewery --overwrite
Import 18 gestartet: 31204332 Elemente werden im Hintergrund eingespielt.
Import 18: abgeschlossen, 31204332 von 31204332

loot exchange import-job#

Large imports and restores run in the background. These commands show their state and cancel them. The number appears in the output of loot exchange import or loot exchange restore. Imports are visible to whoever started them and to tenant admins.

loot exchange import-job get#

text
loot exchange import-job get <id>
ArgumentMeaning
<id>Number of the import
console
$ loot exchange import-job get 17
Import 17: läuft, 18874000 von 31204332

Possible states: waiting ("wartet"), running ("läuft"), completed ("abgeschlossen"), failed ("fehlgeschlagen"), cancelled ("abgebrochen"). At the end the output adds Kopie: Node <nr> (copy) and the report; on a failure Fehler: … appears on the error output. The exit code is 1 for "failed" or "cancelled".

loot exchange import-job cancel#

text
loot exchange import-job cancel <id>
ArgumentMeaning
<id>Number of the import
console
$ loot exchange import-job cancel 17
Import 17: Abbruch angefordert (läuft); eine schon angelegte Kopie wird im Hintergrund gelöscht.

The cancellation takes effect at the next checkpoint. Whatever was already created is deleted again in the background.

Targets#

A target tells an Exchange job where to put its archives. There are three kinds:

KindWhere to
locala folder on the Exchange server
s3object storage
remoteanother LooT installation (the archives are pushed there)

The operator of the installation fixes the location of folders and object storage; targets name only a subfolder or prefix below it.

loot exchange target add#

Creates a target. System admins only.

text
loot exchange target add <name> [--kind local|s3|remote] [--location <place>] [--url <address> --authority <realm-url> --client-id <client> [--secret-ref <name>]]
OptionMeaningDefault
<name>Name of the target–
--kind <kind>local, s3 or remotelocal
--location <place>Kinds local and s3: subfolder or prefix below the location configured by the operator (relative, without ..); required for these kinds–
--url <address>Kind remote: address of the destination installation (node server, http/https without credentials)–
--authority <realm-url>Kind remote: realm URL of the destination installation for the token, e.g. https://auth.target/realms/loot–
--client-id <client>Kind remote: client of the service account with the role loot-exchange-store on the destination installation–
--secret-ref <name>Kind remote: name of the secret in the configuration of the Exchange serverthe client id

For kind remote, --url, --authority and --client-id are required. The secret of the service account never belongs in a command: the operator stores it in the configuration of the Exchange server, and --secret-ref only names it.

console
$ loot exchange target add nightly --kind local --location Brewery
Ziel 3 angelegt: nightly (lokal, Brewery)
$ loot exchange target add offsite --kind remote --url https://loot.partner.example --authority https://auth.partner.example/realms/loot --client-id loot-backup-sender
Ziel 4 angelegt: offsite (remote, )

loot exchange target list#

Lists the targets: number, name, kind, location and, for remote, the client.

console
$ loot exchange target list
3  nightly                   lokal     Brewery
4  offsite                   remote    Client loot-backup-sender

loot exchange target remove#

Removes a target. System admins only; only while no job points to it.

text
loot exchange target remove <target>
ArgumentMeaning
<target>Name or number of the target
console
$ loot exchange target remove offsite
Ziel 'offsite' entfernt.

Exchange jobs#

An Exchange job exports a subtree into a target on a schedule. The export runs on your behalf: the job sees and saves only what you may read. Every run produces a snapshot. Follow-up snapshots contain only the new or changed parts of the value segments (listed as "inkrementell", incremental), which keeps regular backups small. For a restore LooT assembles the chain into a complete archive by itself.

loot exchange job create#

Creates a job. You need the rights Read and Manage on the root node.

text
loot exchange job create <name> --node <path> --target <target> --every <interval> [--at <HH:mm>] [--keep <n>] [--keep-days <n>] [--no-values] [--with-rights] [--no-dependencies]
OptionMeaningDefault
<name>Name of the job–
--node <path> (required)Path of the root node, e.g. Brewery/Plant–
--target <target> (required)Name or number of the target–
--every <interval> (required)Interval: 30m, 6h, 1d or a number of minutes; at least 5 minutes–
--at <HH:mm>fixed time of day in UTC, only for intervals in whole daysany
--keep <n>keep the last n snapshotsall
--keep-days <n>keep snapshots of the last n daysall
--no-valuessave the structure onlyvalues are saved
--with-rightsalso save permissions (needs admin rights on the root node)no
--no-dependenciesdo not save dependencies outside the subtreethey are saved along

If you give both --keep and --keep-days, a snapshot is kept as long as either rule keeps it (among the last n, or younger than the day limit); it expires only when both release it. The newest snapshot is always kept, and an expired snapshot is deleted only when no retained snapshot still needs it. Without both options everything stays.

console
$ loot exchange job create "Plant nightly" --node Brewery/Plant --target nightly --every 1d --at 02:30 --keep 7 --keep-days 30
Exchange-Job 12: Plant nightly (eingeschaltet)
Wurzel: Node 4711, Ziel 3, alle 1440 Minuten um 02:30 UTC
Aufbewahrung: 7 Snapshots, 30 Tage; Werte: ja, Rechte: nein, Abhängigkeiten: ja
Nächster Lauf: 2026-12-01T03:30:00.000000+01:00

loot exchange job list#

Lists the jobs of a tenant: your own, and all of them as tenant admin.

text
loot exchange job list <tenant>
ArgumentMeaning
<tenant>Name or number of the tenant
console
$ loot exchange job list Brewery
12  Plant nightly             an    alle 1440 min  nächster Lauf 2026-12-01T03:30:00.000000+01:00

loot exchange job get#

Shows a job with root, target, schedule, retention and next run.

text
loot exchange job get <id>
ArgumentMeaning
<id>Number of the job

loot exchange job run#

Runs the job immediately. The Exchange server picks it up in its next pass, usually within seconds. Like loot exchange run, but it shows the job.

text
loot exchange job run <id>
ArgumentMeaning
<id>Number of the job

loot exchange job enable#

Switches the job on (again).

text
loot exchange job enable <id>
ArgumentMeaning
<id>Number of the job

loot exchange job disable#

Switches the job off; it no longer runs on schedule but remains.

text
loot exchange job disable <id>
ArgumentMeaning
<id>Number of the job
console
$ loot exchange job disable 12
Exchange-Job 12: Plant nightly (ausgeschaltet)
Wurzel: Node 4711, Ziel 3, alle 1440 Minuten um 02:30 UTC
Aufbewahrung: 7 Snapshots, 30 Tage; Werte: ja, Rechte: nein, Abhängigkeiten: ja
Nächster Lauf: -

loot exchange job delete#

Deletes the job. The archives in the target stay.

text
loot exchange job delete <id>
ArgumentMeaning
<id>Number of the job
console
$ loot exchange job delete 12
Exchange-Job 12 gelöscht; die Archive im Ziel bleiben liegen.

Runs and snapshots#

loot exchange run#

Runs a job immediately; the Exchange server picks it up in its next pass.

text
loot exchange run <job>
ArgumentMeaning
<job>Number of the job
console
$ loot exchange run 12
Exchange-Job 12 ist fällig; Läufe: loot exchange runs 12

loot exchange runs#

Shows the latest runs of a job: number, state (running, succeeded, failed), start, size and, on a failure, the message. For a running run the size shows how much has been exported (or, for a remote target, transferred) so far.

text
loot exchange runs <job>
ArgumentMeaning
<job>Number of the job
console
$ loot exchange runs 12
88  erfolgreich     2026-12-01T03:30:02.114000+01:00  71230411 Bytes
87  erfolgreich     2026-11-30T03:30:01.870000+01:00  1920348 Bytes
86  fehlgeschlagen  2026-11-29T03:30:02.004000+01:00  0 Bytes  Ziel nicht erreichbar

loot exchange snapshots#

Shows the snapshots of a job: number, time, size, full ("voll") or incremental ("inkrementell") and "abgelaufen" (expired) if retention has released it. You need the number for --snapshot on loot exchange import and loot exchange restore.

text
loot exchange snapshots <job>
ArgumentMeaning
<job>Number of the job
console
$ loot exchange snapshots 12
42  2026-12-01T03:30:02.114000+01:00  1920348 Bytes  inkrementell
41  2026-11-30T03:30:01.870000+01:00  71230411 Bytes  voll

Archives from other installations#

If a job (target remote) pushes its archives to your installation, they land in a holding area there – none of it reaches the node tree until a system admin deliberately imports it. The account of the sending side needs the role loot-exchange-store on your installation.

loot exchange store list#

Lists the stored archives: identifier, time, size, number of nodes and values, origin, name and – for an incremental archive – the predecessor archive. System admins only.

text
loot exchange store list
console
$ loot exchange store list
5f0c8d2e-1a47-4b86-9c0e-7d3a5b6c8e91  2026-11-30T03:30:05.442000+01:00  71230411 Bytes  214 Nodes  31204118 Werte  loot.partner.example  Plant nightly

loot exchange store download#

Downloads a stored archive as a standalone archive file. You can then import it with loot exchange import or loot exchange restore. System admins only.

text
loot exchange store download <id> [-o <file>]
OptionMeaningDefault
<id>Archive identifier from loot exchange store list–
-o, --output <file>Target filename from the response, in the current directory
console
$ loot exchange store download 5f0c8d2e-1a47-4b86-9c0e-7d3a5b6c8e91 -o partner-plant.loot-exchange.zip
Geladen: partner-plant.loot-exchange.zip (einspielen mit: loot exchange import partner-plant.loot-exchange.zip --under <Ort>)

See also#

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