Linked Servers And Mirrored Vaults
Two Vaulthalla servers can be linked, and a vault on one of them can then be mirrored to the other. One server stays the vault's core: it owns the vault and takes every change. The other holds a full, encrypted copy that follows every change, can be worked in while the link is up, can take over when the core is gone, and can always walk away with the files as a vault of its own.
Nothing runs until you link a server: a server that links nothing makes no connection and does no background work for this. Linking and mirroring need a super admin on each server.
From Two Servers To A Mirrored Vault
Run these as a super admin on each server, with vh as your own account (not with sudo: root is not a super admin
for these commands). The pages linked from each step have the details, what you will see and what to do when a step
fails.
Link the servers
On the server that has the vault (the core), open the device listener to other hosts and a 10-minute window:
1vh device remote enable2vh peer pairOn the other server, dial it and note the six-digit code it prints:
1vh device remote enable2vh peer link core.example.netBack on the core, pick that code among the three
vh peer pairshows. See Linking Servers.Give the linked server a vault role
On the core, say what the other server's people may do in the vaults it mirrors from here:
1vh peer policy set <server> contributor # reader: only readOffer the vault
On the core (the vault's number comes from
vh vault list):1vh mirror add <vault> --to <server>Accept it on the other server
1vh mirror pending2vh mirror accept <offer>Watch the first copy
On either server,
vh mirror listshows each mirrored vault and its state;vh mirror info <vault>shows one in detail, the first copy's progress included. When the state islive, changes made on either server reach the other. See Mirroring A Vault.
<server> is a linked server's number from vh peer list, its name or its node id. The web console has the same under
System › Linked servers (super admins only), with a Servers tab and a Mirrored vaults tab.
Words Used On These Pages
Mirroring terms
- Meaning
- Another Vaulthalla server this one keeps a pinned, mutually authenticated connection with. It is never a user: on the core, its access to a vault is a vault role.
- Meaning
- The server that owns a mirrored vault. Every change is carried out there first.
- Meaning
- The server that holds a copy of the core's vault. Also used for the copy itself.
- Meaning
- The mirror copying the core's tree when the mirror starts. The copy is read-only until it finishes.
- Meaning
- A change made on the mirror that the core refused. The file goes back to the core's version; the change is kept with its reason until a super admin retries, saves or discards it.
- Meaning
- A file named "name (conflict ...)" that keeps a change made on the mirror beside the core's version.
- Meaning
- A copy whose core ended the mirror while this server kept it. Read-only; follows nothing.
- Meaning
- Moving the core role to the other server by agreement, while both are up.
- Meaning
- Making the mirror the core without the old core, when the old core is gone.
- Meaning
- Turning a held copy into an ordinary vault of this server, without asking the core.
- Meaning
- Mirroring a vault again with a server that still holds it after a mirror between them ended.
What A Mirror Is, And What It Is Not
- It follows deletions. A file deleted on the core is deleted on the mirror. A mirror alone is not a backup of what someone deletes. Turn on versions on the mirror to keep what the core replaces or deletes, and keep your backups.
- Contents travel encrypted. File contents go over the link as the encrypted bytes the core stores and are checked against the size, hash and key the mirror expects. The vault's keys go over the link wrapped to the mirror's key and proven against the attestation key it pinned when the servers were linked.
- The core decides. The vault's settings, keys and remote are the core's and are changed there. On the mirror, only its super admins can use the vault, and only within the vault role the core gives the linked server.
- It is not the
mirrorsync strategy. Themirrorsync strategy keeps an S3/R2 vault in step with its bucket; it has nothing to do with linked servers.
Who May Do What
| Action | Who |
|---|---|
Super admins, on the server's vh, in the web console (it asks you to confirm it's you), or from a fully trusted Vaulthalla Desktop connected directly | |
| Super admins | |
Super admins, or an admin role with Take over as core (admin.mirror.takeover) | |
Super admins, or an admin role with Detach mirrored vaults (admin.mirror.detach) | |
Whoever may assign vault roles on that vault (vh vault role assign <vault> <role> --peer <server>) | |
| Nobody |
Every change is recorded in the audit trail with the linked server named, never with key material.
Pages In This Section
Linking Servers
Pair two servers, give the linked server a vault role, check the link, unlink.
Mirroring A Vault
Offer and accept a vault, work in the copy, held changes, versions, key rotation, deleting and ending a mirror.
Mirror States And Recovery
What each state means, what to do when the link drops, resync, switch, take over and detach.
Reconnecting A Mirror
Mirror a vault again with a server that still holds it, and resolve how the two copies drifted.
