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.1or from config)--cortex-port <port>— Cortex port (default:8080or from config)--cortex-token <token>— Cortex auth token (or setCORTEX_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:
| Flag | Description |
|---|---|
--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:
| Flag | Description |
|---|---|
--peer <nodeId> | Sync with a specific peer only |
Examples
bashmayros 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
Related
- P2P Sync — architecture, pairing, and discovery
- Sync Modes — native vs polled comparison
- Cortex (AIngle) — sidecar overview