Synchronizing Repositories

Synchronizing repositories guide in Porch

Repository Synchronization

Porch periodically synchronizes with registered repositories to discover new packages and updates. You can also trigger manual synchronization when you need immediate updates.

Trigger Manual Sync

Force an immediate synchronization of a repository:

porchctl repo sync porch-test --namespace default

This command schedules a one-time sync (minimum 1-minute delay), updates packages from the repository. This sync is independent of the periodic sync schedule.

Example output:

Repository porch-test sync scheduled

Sync Multiple Repositories

Sync several repositories at once:

porchctl repo sync repo1 repo2 repo3 --namespace default

Sync All Repositories

Sync all repositories in a namespace:

porchctl repo sync --all --namespace default

Sync across all namespaces:

porchctl repo sync --all --all-namespaces

Schedule Delayed Sync

Schedule sync with custom delay:

# Sync in 5 minutes
porchctl repo sync porch-test --namespace default --run-once 5m

# Sync in 2 hours 30 minutes
porchctl repo sync porch-test --namespace default --run-once 2h30m

# Sync at specific time
porchctl repo sync porch-test --namespace default --run-once "2024-01-15T14:30:00Z"