Skip to content
Vaulthalla LogoVaulthalla

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

vh mirror
CommandArgumentsAliasesEffectSummary
<vault>startwriteStart 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.
offersreadList 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>writeAccept 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>writeDecline an offer; the other server is told.
<vault>removedestructiveEnd a vault's mirror, at any step.
lsreadList 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, showreadShow one vault's mirror: this server's role, the linked server, the state, the grant and what step a start is at.
<peer> <state>writeWhether this server accepts every vault a linked server offers without asking (off by default).
<peer> <state>writeOn the core: whether this server mirrors every vault it owns to a linked server, new ones included (off by default).
<peer> <state>writeWhether 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).
readList 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>destructiveDrop a held change (or dismiss a conflict copy's record); nothing in the vault changes.
<held>writeSend 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>readSave the person's version of a held write (decrypted) to a local file; nothing in the vault changes.
<vault>writeLeave 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>writeWhether 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>writeStart 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>writeMove 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>writeOn a mirror whose core is gone or cannot be reached: take over as the vault's core.

vh mirror add

vh mirror add <vault> --to <server> [--json]
vh mirror add
OptionAliasesTypeDefaultRequiredSummary
serverYesThe linked server to mirror it to.
-jflagNoOutput in JSON format.

vh mirror pending

vh mirror pending [--json]
vh mirror pending
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror accept

vh mirror accept <offer> [--json]
vh mirror accept
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror decline

vh mirror decline <offer> [--json]
vh mirror decline
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror cancel

vh mirror cancel <vault> [--offer <offer>] [--remove-copy] [--json]
vh mirror cancel
OptionAliasesTypeDefaultSummary
offerThe offer's number or uid instead of a vault.
flagOn the core: ask the mirror to remove its copy (it keeps it, orphaned, without this or when it keeps removed vaults).
-jflagOutput in JSON format.

vh mirror list

vh mirror list [--json]
vh mirror list
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror info

vh mirror info <vault> [--json]
vh mirror info
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror accept-all

vh mirror accept-all <peer> <state> [--json]
vh mirror accept-all
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror mirror-all

vh mirror mirror-all <peer> <state> [--json]
vh mirror mirror-all
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror keep-removed

vh mirror keep-removed <peer> <state> [--json]
vh mirror keep-removed
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror held

vh mirror held [--vault <vault>] [--all] [--json]
vh mirror held
OptionAliasesTypeDefaultSummary
vaultOne vault only (its number here).
flagInclude the ones discarded or retried.
-jflagOutput in JSON format.

vh mirror discard

vh mirror discard <held> [--json]
vh mirror discard
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror retry

vh mirror retry <held> [--json]
vh mirror retry
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror save

vh mirror save <held> <dest>

vh mirror detach

vh mirror detach <vault> [options]
vh mirror detach
OptionAliasesTypeDefaultSummary
userThe new owner: a sign-in account here (default: you).
nameWith --copy: the new vault's name (default: "<name> copy").
--previewflagShow what detaching would give, and change nothing.
flagWrite a new, separate vault from the held copy instead, which stays as it is.
flagWith --copy: the newest copy's progress.
flagWith --copy: stop the running copy and remove its partial vault.
-jflagOutput in JSON format.

vh mirror versions

vh mirror versions <vault> <state> [--keep-last <n>] [--max-age-days <days>] [--quota-bytes <bytes>] [--json]
vh mirror versions
OptionAliasesTypeDefaultSummary
nVersions kept per file.
daysDays a version is kept.
bytesBytes the vault's versions may take.
-jflagOutput in JSON format.

vh mirror resync

vh mirror resync <vault> [--json]
vh mirror resync
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh mirror switch

vh mirror switch <vault> [--accept-no-access] [--json]
vh mirror switch
OptionAliasesTypeDefaultSummary
flagGo 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).
-jflagOutput in JSON format.

vh mirror takeover

vh mirror takeover <vault> --confirm <name> [--json]
vh mirror takeover
OptionAliasesTypeDefaultRequiredSummary
nameYesThe vault's name, typed exactly.
-jflagNoOutput in JSON format.
vh mirror relink <vault> [options]
vh mirror relink
OptionAliasesTypeDefaultSummary