pro
Sync Operations
Run syncs, understand push vs pull, and configure sync options.
- Running a Sync
- Full Sync
- Understanding Push vs Pull
- Individual Item Sync
- Sync Options
- Content Sync Options
- Mirror vs Merge
- Lokalize Sync Options
- Pages Sync Options
- Asset Sync Options
- Sync Progress
- Selective Sync Strategies
- By Model
- By Content State
- By Date
- Handling Conflicts
- ID-Based Matching
- Timestamps
- Resolution Strategies
- Common Sync Scenarios
- Deploy New Content Model
- Update Existing Content
- Sync Media Library
- Pull Production Data
Running a Sync
Full Sync
- Go to Settings > Sync
- Select a sync target
- Choose Push or Pull
- Select resources to sync
- Click Run Sync
Understanding Push vs Pull
Push - Send local data TO the target server:
[This Server] --data--> [Target Server]
Use push when you want to deploy local changes to another server.
Pull - Retrieve data FROM the target server:
[This Server] <--data-- [Target Server]
Use pull when you want to receive updates from another server.
Individual Item Sync
Sync single content items or pages without a full sync:
- Open the content item or page
- Look for the Sync option in the sidebar
- Select a target and sync direction
- Optionally include linked assets
- Click Sync
This is useful for publishing individual pieces of content.
Sync Options
Content Sync Options
| Option | Description |
|---|---|
| Sync All | Synchronize all models and data |
| Locales | Include locale definitions |
| Models | Select specific models to sync |
| Data | Select specific content to sync |
| Mirror | Replace target data (full reset) |
Mirror vs Merge
Mirror Mode:
- Completely replaces target data with source
- Deletes items that don't exist in source
- Use for clean deployments
Merge Mode (Default):
- Updates existing items
- Adds new items
- Preserves items not in source
- Safer for incremental updates
Lokalize Sync Options
| Option | Description |
|---|---|
| Projects | Select specific translation projects |
| Override | Replace all translations |
| Missing Keys Only | Only add new keys, preserve existing |
Pages Sync Options
| Option | Description |
|---|---|
| Pages | Sync page content |
| Menus | Sync menu structures |
| Settings | Sync Pages addon settings |
Asset Sync Options
| Option | Description |
|---|---|
| Folders | Sync folder structure |
| Files | Transfer file metadata and binary data |
| Exclude Large Files | Skip files over size threshold |
Sync Progress
During sync operations, you'll see:
- Current task - What's being synced
- Progress bar - Completion percentage
- Item counts - Number of items processed
- Errors - Any issues encountered
Selective Sync Strategies
By Model
Only sync specific content models:
â blog_posts
â authors
â categories (excluded)
â settings (excluded)
By Content State
Sync only published content:
// In automation script
$jobs = [
[
'name' => 'content',
'syncSettings' => [
'models' => ['posts'],
'filter' => ['_state' => 1] // Only published
]
]
];
By Date
Sync recently modified content:
$lastSync = strtotime('-24 hours');
$jobs = [
[
'name' => 'content',
'syncSettings' => [
'filter' => ['_modified' => ['$gte' => $lastSync]]
]
]
];
Handling Conflicts
ID-Based Matching
Sync uses document _id fields to match records:
- Same ID = Update existing record
- New ID = Create new record
- Missing ID (in mirror mode) = Delete record
Timestamps
After sync, _modified timestamps are updated on the target.
Resolution Strategies
- Source wins - Default behavior, source data overwrites target
- Target wins - Use "Missing Keys Only" for Lokalize
- Manual - Review before sync, use selective options
Common Sync Scenarios
Deploy New Content Model
- Create model on staging
- Add sample content
- Test thoroughly
- Push model schema to production
- Content team creates production content
Update Existing Content
- Editor modifies content on staging
- Content approved
- Individual item sync to production
- Content is live
Sync Media Library
- Upload assets on staging
- Push assets to production
- Assets available with same IDs
- Content references remain valid
Pull Production Data
- Select production target
- Choose "Pull"
- Select content models
- Local data updated from production
- Test with real data