sync
Synchronization commands for NDCLI. These commands help you monitor and trigger configuration synchronization to devices.
Overview
Configuration sync ensures that devices receive and apply the latest configuration from their assigned templates. Sync status shows whether devices are up-to-date with their expected configuration.
Commands
| Command | Description |
|---|---|
sync status | Show sync status for devices |
sync apply | Trigger sync for devices |
sync status
Show synchronization status for devices.
ndcli sync status [flags]Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--device | string | Filter by device name (regex pattern) | |
--ou | string | Filter by organizational unit (regex pattern) | |
--org | string | current org | Filter by organization (regex pattern) |
Output
Shows for each device:
- Device name
- Organizational unit
- Sync status (synced/pending/error)
- Last sync timestamp
- Configuration version
Sync States
| State | Description |
|---|---|
| Synced | Device has the latest configuration |
| Pending | Device needs to sync new configuration |
| Error | Last sync attempt failed |
| Never | Device has never synced |
Examples
ndcli sync status
ndcli sync status --device fw-prod-01
ndcli sync status --ou production
ndcli sync status --device "fw-.*-01"sync apply
Trigger configuration sync for one or more devices.
ndcli sync apply [flags]Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--device | string | Sync devices matching pattern (regex) | |
--ou | string | Sync all devices in OUs matching pattern (regex) | |
--org | string | current org | Filter by organization (regex pattern) |
--force | bool | false | Force sync even if already synced |
--yes | -y | false | Skip confirmation prompt |
Examples
ndcli sync apply --device fw-prod-01
ndcli sync apply --ou production
ndcli sync apply --ou "prod.*"
ndcli sync apply --device "fw-datacenter-.*"
ndcli sync apply --device fw-prod-01 --force
ndcli sync apply --ou staging --yesConfirmation
By default, sync apply asks for confirmation before triggering syncs. Use --yes or -y to skip:
ndcli sync apply --ou production -yForce Sync
Normally, devices that are already synced are skipped. Use --force to re-sync all matched devices:
ndcli sync apply --ou production --forceCombining Filters
You can combine --device and --ou to narrow the scope:
ndcli sync apply --ou production --device "fw-web-.*"Typical Workflow
ndcli sync status --ou production
ndcli sync apply --ou production
ndcli sync status --ou production
ndcli task list --type SYNC --created-after 5m