mayros sync

Manage Cortex synchronization between Mayros instances. Supports both native P2P (QUIC gossip) and polled REST sync.

Global options

  • --cortex-host <host> — Cortex host (default: 127.0.0.1 or from config)
  • --cortex-port <port> — Cortex port (default: 8080 or from config)
  • --cortex-token <token> — Cortex auth token (or set CORTEX_AUTH_TOKEN)

Subcommands

sync status

Show sync state. In native P2P mode, displays node ID, port, connected peers, gossip stats (round, known IDs, bloom FPR), and sync stats (successful/failed). In polled mode, shows the peer list and last sync timestamps.

Options: --format <fmt> (terminal or json)

sync pair <nodeId> <endpoint>

Register a peer for synchronization. When native P2P is active, also connects via the P2P API.

Options:

FlagDescription
--namespaces <ns...>Namespaces to sync (default: all)

sync remove <nodeId>

Unregister a peer and stop synchronization with it.

sync now

Trigger immediate synchronization. In native mode, shows current gossip stats (gossip handles propagation automatically). In polled mode, triggers a delta sync to all peers.

Options:

FlagDescription
--peer <nodeId>Sync with a specific peer only

Examples

bash
mayros sync status
mayros sync status --format json
mayros sync pair my-server http://10.0.0.5:8080
mayros sync pair my-server http://10.0.0.5:8080 --namespaces mayros shared
mayros sync remove my-server
mayros sync now
mayros sync now --peer my-server