Download and upload readings archives
Ta treść nie jest jeszcze dostępna w Twoim języku.
A readings archive is a SQLite file with setup, synced files, and stored readings. Use it to copy history between workspaces, to keep an offline copy, or to restore local work. Run these commands in a pulled workspace. The file layout is in Archive format, and every flag is in the CLI reference.
Download the whole workspace
Section titled “Download the whole workspace”-
Make sure the checkout has no local changes:
pnpm hmi status. Push or discard them first. -
Run
pnpm hmi download. To leave out readings or const values, add--no-readingsor--no-const-values:Terminal window pnpm hmi downloadpnpm hmi download --no-readings ./workspace.sqliteWithout a file name, the archive goes to
downloads/workspace-YYYY-MM-DD-HHmmss.sqlite. -
Keep the file private. It can contain endpoint PIN codes.
To back up a checkout that has local changes, use the local-only form
pnpm hmi download --no-readings --no-const-values <file>; see
Back up and restore local changes.
Download some parameters
Section titled “Download some parameters”-
Make sure the checkout has no local changes.
-
Find the IDs of the parameters or branches you need, for example with
pnpm hmi sql "SELECT id, name FROM parameter_tree_branch". -
Run
pnpm hmi download-readingswith at least one--parameteror--branch. To limit the time, add--fromand--toin local time. If the destination workspace does not have the same PIN endpoints, add--no-endpoints:Terminal window pnpm hmi download-readings --branch <id> --from "2026-01-01 00:00:00" --to "2026-01-31 23:59:59"pnpm hmi download-readings --parameter <id> --no-endpoints ./out.sqliteWithout a file name, the archive goes to
downloads/readings-YYYY-MM-DD-HHmmss.sqlite.
Upload an archive
Section titled “Upload an archive”Uploading readings replaces stored readings in the archive’s time spans, so it needs the admin or owner role in the destination workspace. An editor can upload an archive without readings.
- Pull the destination workspace, or open its checkout, and make sure it has no local changes.
- To see what would change, run
pnpm hmi upload <file> --dry-run. - Run
pnpm hmi upload <file>. Answer each confirmation for setup, const, and reading conflicts. To skip the confirmations after you reviewed the dry run, add--force. - To make the setup equal to the archive’s, deleting entities and files the archive does not have,
pull first, then run
pnpm hmi upload <file> --replace.
Recover from a failed upload
Section titled “Recover from a failed upload”- If
hmi checkor the push fails after the setup was written, fix the reported problem and runpnpm hmi push, or discard the changes withpnpm hmi pull --discard-local. Do not runhmi uploadagain until the checkout is clean. - If writing const values or readings fails after the push, run
pnpm hmi upload <file>again. - If the push fails with
pin_create_forbidden, download the archive again withdownload-readings --no-endpoints, or connect the device in Setup → Endpoints first. - If upload stops after pushing because the setup changed on the server during
--replace, runpnpm hmi pull, then run the upload with--replaceagain.