vh mirror
Reference for vh mirror - mirror a vault between this server and a linked one, accept offers, handle held changes, switch or take over the core.
vh mirror keeps a copy of a vault on a linked server. One server is the vault's core; the other holds a
copy and the vault's keys. Changes made on the copy are sent to the core, which may refuse them: a refused change is
held on the copy, with its reason, until a super admin retries, saves or discards it. Most commands are for super
admins and are recorded in the audit trail.
1vh mirror add <vault> --to <peer> # on the core2vh mirror pending # on the other server3vh mirror accept <offer>4vh mirror list5vh mirror held6vh mirror switch <vault> # move the core role by agreement7vh mirror detach <vault> # keep a copy as a standalone vault
When the core is gone for good, vh mirror takeover makes the copy the core; vh mirror relink mirrors a vault again
with a server that still holds it and resolves how the two trees drifted.
The guide: Mirroring A Vault, and Mirror States And Recovery for what each state means and the way out.
Commands
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
<vault> | start | write | Start mirroring one of this server's vaults to a linked server: this server stays the vault's core, the other gets a copy and the vault's keys. | |
offers | read | List the vaults linked servers offer this server that wait for a super admin's answer, and the relinks they ask of this server's vaults (vh mirror relink <vault> --accept | --decline | --approve): who asks, which vault, what accepting lets them see, the outcome to approve. | ||
<offer> | write | Accept an offer: the other server then sends the vault's keys, this server proves each against the key it pinned when the servers were linked, and creates the vault (empty until its tree is copied). | ||
<offer> | write | Decline an offer; the other server is told. | ||
<vault> | remove | destructive | End a vault's mirror, at any step. | |
ls | read | List the mirrored vaults here (this server's role, the linked server, the grant), the starts in progress, and the vaults detached here (standalone now; the re-key pass is recommended). | ||
<vault> | status, show | read | Show one vault's mirror: this server's role, the linked server, the state, the grant and what step a start is at. | |
<peer> <state> | write | Whether this server accepts every vault a linked server offers without asking (off by default). | ||
<peer> <state> | write | On the core: whether this server mirrors every vault it owns to a linked server, new ones included (off by default). | ||
<peer> <state> | write | Whether this server keeps the vaults a linked server (their core) removes: with it on, a removal the core asks for leaves the copy here as an orphaned copy (off by default). | ||
| read | List the changes made here to a vault this server mirrors that its core refused (held: the entry went back to the core's state and the change is kept, with the reason) or turned into a conflict copy. | |||
<held> | destructive | Drop a held change (or dismiss a conflict copy's record); nothing in the vault changes. | ||
<held> | write | Send a held change to the vault's core again, as the person who made it (after the core's grant changed, say); it comes back in the log, or is held again. | ||
<held> <dest> | read | Save the person's version of a held write (decrypted) to a local file; nothing in the vault changes. | ||
<vault> | write | Leave a mirror with its files: a copy of another server's vault held here (live, stopped, diverged, expired or orphaned; link up, down or gone) becomes a standalone vault on this server, without asking the core, which is told when it is reachable. | ||
<vault> <state> | write | Whether this server keeps versions of what a vault's core replaces or deletes (a vault held here as another server's mirror; off by default): before the core's change is applied here, the file's prior version is kept, bounded by the limits (when turning it on, unset ones default to the last 10 versions per file for 30 days; 0 is no limit of that kind). | ||
<vault> | write | Start a copy that stopped (diverged, expired or stopped) over from its core's tree, without making it again: files whose bytes are here already are not fetched; changes still pending, this server's version of a file the core's replaces and anything the core's tree does not hold are kept as held changes (vh mirror held). | ||
<vault> | write | Move a mirrored vault's core role to the other server by agreement, asked on either server: the core stops taking changes (the vault is read-only on both servers for moments), the mirror applies its last change with the same digest and nothing pending, then the roles swap in the next term. | ||
<vault> | write | On a mirror whose core is gone or cannot be reached: take over as the vault's core. | ||
<vault> | reconnect | write | Mirror a vault again with a linked server that holds it too since a mirror between them ended (detached, the core ended it or the servers were unlinked, an old core rejoining or forked after a take over), and resolve how the two trees drifted. |
vh mirror add
vh mirror pending
vh mirror pending [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror accept
vh mirror accept <offer> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror decline
vh mirror decline <offer> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror cancel
vh mirror cancel <vault> [--offer <offer>] [--remove-copy] [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
offer | The offer's number or uid instead of a vault. | |||
flag | On the core: ask the mirror to remove its copy (it keeps it, orphaned, without this or when it keeps removed vaults). | |||
-j | flag | Output in JSON format. |
vh mirror list
vh mirror list [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror info
vh mirror info <vault> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror accept-all
vh mirror accept-all <peer> <state> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror mirror-all
vh mirror mirror-all <peer> <state> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror keep-removed
vh mirror keep-removed <peer> <state> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror held
vh mirror discard
vh mirror discard <held> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror retry
vh mirror retry <held> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror save
vh mirror save <held> <dest>vh mirror detach
vh mirror detach <vault> [options]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
user | The new owner: a sign-in account here (default: you). | |||
name | With --copy: the new vault's name (default: "<name> copy"). | |||
--preview | flag | Show what detaching would give, and change nothing. | ||
flag | Write a new, separate vault from the held copy instead, which stays as it is. | |||
flag | With --copy: the newest copy's progress. | |||
flag | With --copy: stop the running copy and remove its partial vault. | |||
-j | flag | Output in JSON format. |
vh mirror versions
vh mirror versions <vault> <state> [--keep-last <n>] [--max-age-days <days>] [--quota-bytes <bytes>] [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
n | Versions kept per file. | |||
days | Days a version is kept. | |||
bytes | Bytes the vault's versions may take. | |||
-j | flag | Output in JSON format. |
vh mirror resync
vh mirror resync <vault> [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh mirror switch
vh mirror switch <vault> [--accept-no-access] [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
flag | Go ahead even though the old core would hold no role on the vault on its new core (its people could not read it there until one is set). | |||
-j | flag | Output in JSON format. |
vh mirror takeover
vh mirror relink
vh mirror relink <vault> [options]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
server | The linked server holding the vault too. | |||
side | The hard override: this or theirs, whose tree wins everywhere. | |||
choices | Choices: uid=this|theirs|both|default, kind:<kind>=..., all=... (comma-separated). | |||
side | Which server becomes the core: this or theirs. | |||
choice | The choice for entries left unset: this, theirs, both or core. | |||
kind | List the drifted entries of one kind (or all). | |||
n | With --show or --review: skip this many entries. | |||
name | The vault's name, typed exactly (to apply). | |||
flag | Compare and list the drifted entries to choose for each. | |||
flag | Carry the saved plan out. | |||
flag | The plan or the relink running, without comparing again. | |||
flag | End the relink here: the plan, or the request (the other server is told). | |||
flag | Asked by a linked server: let it compare its copy with this vault (names, places, hashes; no contents). | |||
flag | Asked by a linked server: decline its request or its outcome (nothing changes on either server). | |||
flag | Asked by a linked server: approve the outcome it proposes (with --confirm <name>). | |||
-j | flag | Output in JSON format. |
