mirror sync
verbdestructiveBring a replica to its primary, never touching what the replica changed itself.
Program anyfs-reader. Origin anyfs.
Governance: the action
What the verb is and may do, as governance says it. Each annotation is expressed by the surfaces or says why it is not.
| Property | Value |
|---|---|
kind | action |
effect | destructive |
idempotent | false |
audience | both |
tier | writer |
dryRun | true |
check | false |
reachChannels | local, mcp |
reachReadOnly | false |
reachNeedsTty | false |
reachRunsAs | caller |
reachConfirmation | flag |
Operands
| Operand | Meaning |
|---|---|
PRIMARY | The directory that is the source of truth. |
REPLICA | The directory that follows it. |
Options
| Option | Meaning | Properties |
|---|---|---|
--max-deletes | Allow at most N deletes at the replica: none without it. | type=value, required=false, standard=false, humanOnly=false, valueName=N |
--include | Only paths that match a glob (a * is within one name, ** crosses directories); give it again for more. | type=many, required=false, standard=false, humanOnly=false, valueName=GLOB |
--exclude | Leave out paths that match a glob; give it again for more. | type=many, required=false, standard=false, humanOnly=false, valueName=GLOB |
--plan-hash | Apply only the plan with this hash, which a --dry-run printed: if the stores changed since, nothing is applied. | type=value, required=false, standard=false, humanOnly=false, valueName=HASH |
--json | Write one JSON document and nothing else for a person. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--quiet | Show only how it ended. | type=flag, short=q, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--verbose | Show every step as it happens. | type=flag, short=v, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--color | Use colour where the terminal shows it (--no-color turns it off). | type=flag, required=false, standard=true, humanOnly=false, negatable=true, default=true |
--non-interactive | Never ask a question: where one is needed, fail and say so. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--dry-run | Show what would change and change nothing. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--yes | Confirm the destruction without asking. | type=flag, short=y, required=false, standard=true, humanOnly=false, negatable=false, default=false |
Examples
anyfs mirror sync --dry-run fleet:/ s3backup:/fleet # How far behind the replica is, and the hash of that state.
anyfs mirror sync --yes --plan-hash <hash> fleet:/ s3backup:/fleet # Bring it up; what the replica changed itself is never touched.Physical: what it is drawn as
Not drawn by any surface for this tier.
Not drawn
- cli: mirror sync is for the tier writer; this caller holds reader
- mcp: mirror sync is for the tier writer; this caller holds reader
- rest: mirror sync is for the tier writer; this caller holds reader