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#
| Commands | Need |
|---|---|
loot exchange preview, loot exchange export, loot exchange import, loot exchange restore, loot exchange import-job get, loot exchange import-job cancel | only the normal sign-in (loot login) |
loot exchange verify | no 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 restore | the 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 example2026-01-01or2026-01-01T00:00:00Z. Without a time zone your local system time applies, with the global option--utcUTC.--fromincludes the instant,--toexcludes 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 importandloot exchange restore(on export: do not save, on import: do not apply):
| Option | Effect |
|---|---|
--no-commands | leave out commands (definitions, parameters, visibility, connections) |
--no-components | leave out components and their bindings |
--no-data-sources | leave out assignments of data points of external sources |
--no-templates | leave 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.
loot exchange preview <path> [--no-values] [--no-dependencies]| Option | Meaning |
|---|---|
<path> | Path of the root node, e.g. Brewery/Plant |
--no-values | Calculate without values |
--no-dependencies | Calculate without dependencies |
$ 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.
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]| Option | Meaning | Default |
|---|---|---|
<path> | Path of the root node | – |
-o, --output <file> | Target file | <node>-<timestamp>.loot-exchange.zip in the current directory |
--no-values | structure only, without values | values are saved |
--from <time> | only values from this instant on (inclusive) | all |
--to <time> | only values before this instant (exclusive) | all |
--with-rights | also save the permissions of the nodes | permissions are not saved |
--no-dependencies | do not save nodes outside the subtree | readable dependencies are saved along |
--no-commands, --no-components, --no-data-sources, --no-templates | leave 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".
$ 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 Ordnungloot exchange verify#
Checks an archive locally: format version and checksums of all parts. No server is needed; the archive is neither uploaded nor changed.
loot exchange verify <file>| Argument | Meaning |
|---|---|
<file> | Archive from loot exchange export |
$ 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 OrdnungIf 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.
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]| Option | Meaning | Default |
|---|---|---|
<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 root | name in the archive; on a name conflict Name (2), Name (3) … |
--no-values | import the structure only | values are imported |
--from <time>, --to <time> | restrict values to a time interval | all |
--no-aliases | do not import aliases | aliases are imported; the import aborts if one is already taken in the tenant |
--dry-run | show only the report, create nothing | – |
--no-wait | do not wait for the end of a background import | waits and shows progress |
--with-rights | also import the permissions of the archive | permissions 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 skip | copy |
--bind <guid>=<path> | bind one dependency to a specific node; repeatable | – |
--no-commands, --no-components, --no-data-sources, --no-templates | do not import parts | everything is imported |
Always try --dry-run first: the report names conflicts, size, parts not included and affected users and groups without creating anything.
$ 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 entfallenThen the actual import:
$ 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 90412The 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:
| Mode | Effect |
|---|---|
copy | The dependencies are created as new nodes next to the root (default on import). |
bind | References go to the node that has the same identifier in the target system. --bind <guid>=<path> selects individual targets. |
skip | The 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:
{
"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.
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]| Option | Meaning | Default |
|---|---|---|
<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 | – |
--overwrite | align existing nodes with the same identifier (properties, aliases, tags, links, layouts, connections in the subtree) and add values | existing nodes stay unchanged |
--prune | delete children under the root that the archive does not know (needs --overwrite) | they stay |
--no-values | restore the structure only | values are restored |
--from <time>, --to <time> | restrict values to a time interval | all |
--no-wait | do not wait for the end of a background run | waits |
--dry-run | show only the report (what would be created, aligned and deleted) | – |
--with-rights | also 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 skip | bind (node with the same identifier) |
--bind <guid>=<path> | bind one dependency to a specific node; repeatable | – |
--no-commands, --no-components, --no-data-sources, --no-templates | do not restore parts | everything |
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.
$ 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 31204332loot 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#
loot exchange import-job get <id>| Argument | Meaning |
|---|---|
<id> | Number of the import |
$ loot exchange import-job get 17
Import 17: läuft, 18874000 von 31204332Possible 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#
loot exchange import-job cancel <id>| Argument | Meaning |
|---|---|
<id> | Number of the import |
$ 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:
| Kind | Where to |
|---|---|
local | a folder on the Exchange server |
s3 | object storage |
remote | another 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.
loot exchange target add <name> [--kind local|s3|remote] [--location <place>] [--url <address> --authority <realm-url> --client-id <client> [--secret-ref <name>]]| Option | Meaning | Default |
|---|---|---|
<name> | Name of the target | – |
--kind <kind> | local, s3 or remote | local |
--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 server | the 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.
$ 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.
$ loot exchange target list
3 nightly lokal Brewery
4 offsite remote Client loot-backup-senderloot exchange target remove#
Removes a target. System admins only; only while no job points to it.
loot exchange target remove <target>| Argument | Meaning |
|---|---|
<target> | Name or number of the target |
$ 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.
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]| Option | Meaning | Default |
|---|---|---|
<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 days | any |
--keep <n> | keep the last n snapshots | all |
--keep-days <n> | keep snapshots of the last n days | all |
--no-values | save the structure only | values are saved |
--with-rights | also save permissions (needs admin rights on the root node) | no |
--no-dependencies | do not save dependencies outside the subtree | they 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.
$ 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:00loot exchange job list#
Lists the jobs of a tenant: your own, and all of them as tenant admin.
loot exchange job list <tenant>| Argument | Meaning |
|---|---|
<tenant> | Name or number of the tenant |
$ loot exchange job list Brewery
12 Plant nightly an alle 1440 min nächster Lauf 2026-12-01T03:30:00.000000+01:00loot exchange job get#
Shows a job with root, target, schedule, retention and next run.
loot exchange job get <id>| Argument | Meaning |
|---|---|
<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.
loot exchange job run <id>| Argument | Meaning |
|---|---|
<id> | Number of the job |
loot exchange job enable#
Switches the job on (again).
loot exchange job enable <id>| Argument | Meaning |
|---|---|
<id> | Number of the job |
loot exchange job disable#
Switches the job off; it no longer runs on schedule but remains.
loot exchange job disable <id>| Argument | Meaning |
|---|---|
<id> | Number of the job |
$ 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.
loot exchange job delete <id>| Argument | Meaning |
|---|---|
<id> | Number of the job |
$ 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.
loot exchange run <job>| Argument | Meaning |
|---|---|
<job> | Number of the job |
$ loot exchange run 12
Exchange-Job 12 ist fällig; Läufe: loot exchange runs 12loot 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.
loot exchange runs <job>| Argument | Meaning |
|---|---|
<job> | Number of the job |
$ 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 erreichbarloot 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.
loot exchange snapshots <job>| Argument | Meaning |
|---|---|
<job> | Number of the job |
$ 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 vollArchives 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.
loot exchange store list$ 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 nightlyloot 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.
loot exchange store download <id> [-o <file>]| Option | Meaning | Default |
|---|---|---|
<id> | Archive identifier from loot exchange store list | – |
-o, --output <file> | Target file | name from the response, in the current directory |
$ 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#
- Recipes: nightly backup with Exchange jobs, copying a subtree into another tenant.
- loot node: cloning and templates when you only want to copy structure without an archive file.
- Command index and Configuration.