Skip to content

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

CommandDescription
sync statusShow sync status for devices
sync applyTrigger sync for devices

sync status

Show synchronization status for devices.

Terminal window
ndcli sync status [flags]

Flags

FlagTypeDefaultDescription
--devicestringFilter by device name (regex pattern)
--oustringFilter by organizational unit (regex pattern)
--orgstringcurrent orgFilter 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

StateDescription
SyncedDevice has the latest configuration
PendingDevice needs to sync new configuration
ErrorLast sync attempt failed
NeverDevice has never synced

Examples

Terminal window
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.

Terminal window
ndcli sync apply [flags]

Flags

FlagTypeDefaultDescription
--devicestringSync devices matching pattern (regex)
--oustringSync all devices in OUs matching pattern (regex)
--orgstringcurrent orgFilter by organization (regex pattern)
--forceboolfalseForce sync even if already synced
--yes-yfalseSkip confirmation prompt

Examples

Terminal window
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 --yes

Confirmation

By default, sync apply asks for confirmation before triggering syncs. Use --yes or -y to skip:

Terminal window
ndcli sync apply --ou production -y

Force Sync

Normally, devices that are already synced are skipped. Use --force to re-sync all matched devices:

Terminal window
ndcli sync apply --ou production --force

Combining Filters

You can combine --device and --ou to narrow the scope:

Terminal window
ndcli sync apply --ou production --device "fw-web-.*"

Typical Workflow

Terminal window
ndcli sync status --ou production
ndcli sync apply --ou production
ndcli sync status --ou production
ndcli task list --type SYNC --created-after 5m