Skip to content

sync

The everyday gesture on a machine that is one of several: bring back what the other machines published, fold it in, and send the combined vault back up.

Terminal window
sefy sync [OPTIONS]

Takes the same options as pull:

Option Meaning
-p, --transport <NAME> Which transport to use; omit when only one is installed.
--name <NAME> What the remote copy is called. Default vault.
--remote-password-env <VAR> Read the remote copy’s password from this variable.
--ask-remote-password Ask for the remote copy’s password instead of reusing this vault’s.
Terminal window
$ sefy sync
Master password:
synced "vault" through github
downloaded 12.4 KiB
uploaded 12.6 KiB
merged: 2 added, 0 updated, 14 unchanged

Not a preference. Pushing first would replace the remote copy with one that never saw its contents — every secret added on another machine would vanish from the only copy that had it. Pulling first means the file that goes up already holds both sides.

Even when the pull brought nothing new. Whether the local file differs from the remote one is not knowable from here — the format carries no counter in the clear, by design — so a sync that changed nothing costs one upload rather than a guess about whether it was needed.

A sync merges, so it reports conflicts exactly as pull and merge do: the copy changed more recently is current, and the other is kept in the item’s history. What goes up carries that history, so the other machines receive the settled item and the version that lost — the conflict is settled once, not once per machine. To choose the other version after all, restore it and sync again.