Clone
9
JOOMLA_SYNC
Jonathan Miller edited this page 2026-05-20 01:26:13 +00:00

← Back to Home

Joomla Extension Sync

Sync Joomla sites between two servers with three modes -- manifest-based smart sync, full rsync via SSH, or SFTP directory scan.


Sync Modes

Mode Flag Speed When to Use
Manifest (default) -- Fastest After updating extensions -- only syncs changed ones
Rsync --rsync Fast After core updates or when files are broadly out of sync. Requires SSH key on source server to reach destination
Full SFTP --full Slowest When servers can't SSH to each other directly

How Each Mode Works

Manifest (default)

  1. Reads extension manifest XML files from both servers via SFTP
  2. Compares versions -- identifies extensions with mismatches
  3. Syncs only the directories and language files for changed extensions
  4. Typically completes in seconds

Rsync (--rsync)

  1. SSHs to source server
  2. Runs rsync --delete to destination, excluding per-environment files
  3. Best when both servers share the same SSH user -- source server needs an SSH key that can reach destination
  4. Syncs everything (core, libraries, vendor, media) in one pass

Full SFTP (--full)

  1. Connects to both servers via SFTP simultaneously
  2. Walks every file in every extension directory
  3. Compares by timestamp (default) or size (--force)
  4. Slowest but works when servers can't reach each other

Usage

Via MCP

standards_sync_joomla(
    source_config: "scripts/sftp-config/sftp-config.dev.json",
    dest_config:   "scripts/sftp-config/sftp-config.rs.json",
    mode:          "manifest",   // manifest | rsync | full
    dry_run:       false
)

Via CLI

# Smart sync — only changed extensions (default)
php deploy/sync-joomla.php \
    --source sftp-config.dev.json --dest sftp-config.rs.json

# Full site rsync via SSH (after core updates)
php deploy/sync-joomla.php \
    --source sftp-config.dev.json --dest sftp-config.rs.json --rsync

# Dry-run any mode
php deploy/sync-joomla.php \
    --source sftp-config.dev.json --dest sftp-config.rs.json --rsync --dry-run

Excluded Files (all modes)

Always skipped to prevent overwriting per-environment config:

File/Directory Reason
configuration.php Database, paths, secrets differ per server
.htaccess Server-specific rewrite rules
cache/, tmp/, logs/ Transient data
.git/, vendor/, tests/ Dev-only (rsync mode)
.DS_Store, Thumbs.db, *.swp OS/editor junk

What Gets Synced per Extension (manifest mode)

Type Directories Language
Component administrator/components/com_xxx/, components/com_xxx/, media/com_xxx/ */language/*/com_xxx.*
Plugin plugins/group/name/, media/plg_group_name/ */language/*/plg_group_name.*
Module (site) modules/mod_xxx/, media/mod_xxx/ */language/*/mod_xxx.*
Module (admin) administrator/modules/mod_xxx/ */language/*/mod_xxx.*
Template templates/xxx/, media/templates/site/xxx/ --

SSH Key Setup for Rsync Mode

The source server needs an SSH key that can reach the destination:

# On the source (dev) server:
ssh-keygen -t ed25519 -f ~/.ssh/id_sync_to_live -N ''

# Add the public key to the destination (live) server:
ssh-copy-id -i ~/.ssh/id_sync_to_live user@live-host

The sync script auto-detects keys at ~/.ssh/id_sync_to_live, ~/.ssh/id_ed25519, or ~/.ssh/id_rsa.


SFTP Config Format

Standard Sublime Text SFTP format:

{
    "type": "sftp",
    "host": "example.com",
    "user": "username",
    "port": "22",
    "remote_path": "/home/user/site/public_html/",
    "ssh_key_file": "path/to/key.ppk",
    "connect_timeout": 30
}

Akeeba Backup JSON API v2

The monitoring system queries Akeeba Backup status via the JSON API v2. Key differences from earlier versions:

Authentication

Parameter Value
Auth parameter _akeebaAuth (not key)
Configuration Akeeba Backup: Components > Akeeba Backup > Options > Frontend Secret Word

API Endpoint

Route Auth Method
/index.php?option=com_akeebabackup&view=Api&format=raw _akeebaAuth parameter
/api/index.php/v2/akeebabackup X-Joomla-Token header

Full URL example:

https://example.com/index.php?option=com_akeebabackup&view=Api&format=raw&method=listBackups&_akeebaAuth=YOUR_SECRET
  • Method parameter: method (not action) -- e.g. method=listBackups


Repo: moko-platform · moko-platform wiki

Field Value
Minimum Version 04.07.00
Platform joomla
Applies To Joomla repositories
Revision Date Author Description
1.0 2026-05-09 Moko Consulting Initial version