Reference: Export and import

Reference for the "Export and import" group of qargi commands: every verb with its arguments, options and examples, generated from the release.

Updated

qargi export #

Save a project's setup, definitions and memories to one file.

Writes one archive of the parts you select: config (project answers, instances, profiles, the skill and tool library), definitions (the cloud agents, deployments and environment as they are now, secrets removed), memories (every note of the memory and reference stores), state (session tracker, audit log) and credentials (token files; only in an encrypted archive). It asks what to include and for an optional password; with one, the whole archive is encrypted by gpg (AES-256) and the password never goes into a command line. It only reads: nothing is changed or deleted.

qargi export [OPTIONS]

OptionArgumentWhat it does
--projectNAMESonly these projects, comma separated (default: ask, or all)
--onlyPARTSthe parts: config, definitions, memories, state, credentials (default: ask)
--outFILEthe file to write (default: qargi-export-<time>.tar.gz[.gpg] here)
--password-fileFILEencrypt with the first line of this file
--no-encryptwrite the archive without a password (for scripts)
qargi export
qargi export --project acme --only config,memories --no-encrypt --out acme.tar.gz

qargi import #

Restore from an export, choosing what and how.

Reads an archive made by qargi export (asking for the password when it is encrypted), shows what is inside, asks which parts and projects to import and, for each part, how to treat what already exists: merge (add what is missing), overwrite (also replace what differs) or replace (make it match the archive, removing the rest). It then prints the plan and writes nothing until you confirm; replaced and removed items are saved under the state directory first. The archive is treated as untrusted data: names and checksums are verified. Definitions are restored as files only (rebuild with provision). Memory notes go to the stores named in the project's answers. An archive's project answers never add or change models.extensions or models.accept_no_barrier (they take a plan token and an approval: qargi provider enable, disable, accept): the stored value stays, or the key is left out, and a note says so. It asks at a terminal; --dry-run shows the plan without one.

qargi import FILE [OPTIONS]

OptionArgumentWhat it does
--onlyPARTSthe parts to import (default: ask)
--projectNAMESonly these projects of the archive, comma separated
--modeMODEmerge, overwrite or replace for every part (default: ask for each)
--password-fileFILEthe password is the first line of this file
--dry-runprint the plan and stop; changes nothing
qargi import acme.tar.gz.gpg
qargi import acme.tar.gz --dry-run --only memories