Reconnecting A Mirror
Mirror a vault again with a linked server that still holds it after a mirror ended, compare the two copies and choose whose files win.
When a mirror ended but both servers still hold the vault, vh mirror relink mirrors it again and resolves how the
two copies drifted. Use it when one server detached its copy, the core ended the mirror, the servers were unlinked and
linked again, an old core came back after a take over (rejoining), or both servers took over (forked).
Both servers must be linked and hold the same keys for the vault: a relink moves no keys. Super admins only, on both servers; the console's Reconnect… action on a detached, orphaned, rejoining or forked vault does the same, after confirming your identity.
The Short Version
On the server where you start (here called this server; the other one is theirs):
1vh mirror relink <vault> --with <server> # ask; once they accept, run it again to compare
Then propose the outcome, one of two ways:
1# This server's files win everywhere (or --keep theirs):2vh mirror relink <vault> --with <server> --keep this --confirm <vault name>3 4# Or go through the drifted entries, choose, and propose the plan:5vh mirror relink <vault> --with <server> --review6vh mirror relink <vault> --choose all=both --apply --confirm <vault name>
On the other server, a super admin answers twice:
1vh mirror pending # the request, then the outcome to approve2vh mirror relink <vault> --accept # let this server compare (names and structure, never contents)3vh mirror relink <vault> --approve --confirm <vault name>
The server that asked then carries it out on its own.
How Both Servers Agree
A detach, an ended mirror or an unlink ends the trust between two servers about a vault, so neither can reconnect it alone.
Ask
vh mirror relink <vault> --with <server>on this server sends a request. A super admin on the other server sees it invh mirror pending(and under Relink requests in the console), with who asks, which vault, and that accepting lets this server see the vault's file and folder names and structure, never its contents.They accept
vh mirror relink <vault> --acceptthere, or--decline. Run the relink command again here once they have: the two copies are compared entry by entry and the result is kept as a plan.Choose
Keep one server's files everywhere, or go through the changes (below).
Propose
vh mirror relink <vault> --apply --confirm <vault name>(or--keep this|theirswith--confirm) proposes the outcome: which server becomes the core, and how many entries the other server's vault takes, keeps as held changes or gains as conflict copies. Nothing changes on either server yet.They approve
vh mirror relink <vault> --approve --confirm <vault name>on the other server. The server that asked then carries it out on its own. The server whose files win becomes the vault's core, and the other its mirror again.
Requests expire after a day. Declining, or cancelling with vh mirror relink <vault> --discard, changes nothing on
either server. A plan is refused once either copy changes under it (compare again), and while either server has
changes waiting, a switch or a start running, or is deleting the vault. A changed plan, or a change to either copy since
the approval, voids the approval. There is no setting to accept relinks automatically.
What The Comparison Finds
Each drifted entry has a kind. --show <kind> lists the entries of one kind (or all); --offset <n> pages through
them.
Drift kinds
- Meaning
- Only this server holds the entry.
- Meaning
- Only the other server holds it.
- Meaning
- Both hold it; it changed on this side since they last agreed.
- Meaning
- Both hold it; it changed on the other side.
- Meaning
- Both hold it and it changed on both sides.
- Meaning
- Both hold it and it differs, with no record of when they last agreed.
Choose Whose Files Win
Keep one side everywhere (the hard override): --keep this or --keep theirs, with --with <server> and
--confirm <vault name>. This proposes the outcome at once; no --apply is needed.
Or go through the changes: vh mirror relink <vault> --review compares and lists every drifted entry by path, then
set choices and apply:
| Option | Type | Summary |
|---|---|---|
choices | Comma-separated: <uid>=this|theirs|both|default for one entry, kind:<kind>=… for every entry of a kind, all=… for everything. both keeps the second version as a conflict copy beside the first. | |
choice | The choice for entries left unset: this, theirs, both or core. | |
side | Which server becomes the core: this or theirs. | |
flag | The plan or the relink running, without comparing again. |
1vh mirror relink 4 --with vps --review2vh mirror relink 4 --choose kind:changed_theirs=theirs,all=both3vh mirror relink 4 --apply --confirm photos
Nothing Is Dropped
Whatever the losing side had that differs is kept: as a held change with its bytes (vh mirror held, then retry,
save or discard it), as a conflict copy, or in the core's trash. See
Held changes.
Related: Mirror States And Recovery, vh mirror relink.
