Sync Architecture
Nodes Online
—
Primary · Standby · Backup
Active Failovers
—
Hostinger · A2 Hosting
Workflows Active
—
3 triggers · Master Workflow v2.0 · 32 nodes
Sync Flow — Failover Chain
H
Hostinger
A2
A2 Host
LO
Local
n8
n8n
—
Nodes Online
—
Active Failovers
—
WF Active
—
sync_log
Sync Health Score
Live
History
Node Uptime
Last Synced
— waiting for first sync —
⚡
LIVE DATA SYNC MONITOR
via n8n Cloud · auto-check every 120s
Running...
● No Webhook
Hostinger
Primary · hPanel
Waiting
→
A2 Hosting
Mirror · cPanel
Waiting
→
Local MySQL
Backup
Waiting
via
n8n Cloud
5 workflows · 32 nodes
Waiting
Last run: —
Duration: —
Result: —
Records synced: —
Sync Event Log
No sync events yet — run a sync to begin.
Workflow Schedules
Full Sync WF1 · 5 nodes · Hostinger→A2
0 2 * * *
Every day 2AM
—
Incremental Sync WF2+WF3 · 14 nodes · Hostinger→A2→Local
*/15 * * * *
Every 15 min
—
Failover & Recovery WF4+WF5 · 13 nodes · Detection+Push
*/5 * * * *
Every 5 min
—
Failover Chain
Normal → Hostinger active
Failover 1 → A2 takes over
Failover 2 → Local is primary
Recovery → Local→A2→Hostinger push
Master Workflow v2.0 — Node Explorer
All 5 sync workflows combined into 1 · 3 schedule triggers · 32 nodes total
⚡ WF6 Live Webhook — Connect Dashboard
● Not Connected
Paste your WF6 webhook URL from n8n. Once connected, all sync data is pulled directly from your actual
sync_log table.Last fetch: —
WF6 Setup Steps — Import to n8n
1
Import the updated JSON
Download
mysql_db_sync_master_workflow_v2.1.json and import it into n8n. WF6 Webhook node is already included.2
Set WF6_WEBHOOK_URL variable
In n8n: go to Settings → Variables → add
WF6_WEBHOOK_URL = your WF6 webhook URL. All workflows use this variable to notify the dashboard after every run.3
Activate WF6 sa n8n
Activate the WF6 workflow in n8n. Your production webhook URL will appear on the WF6 node — format:
https://app.n8n.cloud/webhook/db-sync-status4
Paste the URL above and click Connect
Copy the production URL into the input above, then press Connect. All tabs (Dashboard, Nodes) will update using your actual
sync_log data. WF6 Response Payload — Reference
Ito ang JSON na ire-return ng WF6 sa dashboard — direkta mula sa
sync_log table:{
"nodes_online": 3, // 0–3, based on failover flags
"active_failovers": 0, // count of nodes in failover
"failover_hostinger": false, // true if Hostinger is down
"failover_a2": false, // true if A2 is down
"wf_active": 3, // workflows with status=success
"records_synced": 5, // sync_log success row count
"triggers": {
"full_sync": "success", // WF1 last status
"incremental": "success", // WF2 last status
"a2_to_local": "success", // WF3 last status
"failover": "ok" // WF4 current state
},
"last_synced": {
"full_sync": "2025-05-21T02:00:05Z",
"incremental": "2025-05-21T14:15:03Z",
"a2_to_local": "2025-05-21T14:15:04Z"
},
"generated_at": "2025-05-21T14:32:00Z"
}
Quick SQL — Monitoring Queries
Sync Health Check (Local MySQL)
SELECT workflow_name, last_synced_at, status, notes
FROM sync_log ORDER BY last_synced_at DESC;
Record Count Comparison
SELECT table_name, table_rows AS est_rows
FROM information_schema.tables
WHERE table_schema='your_database_name'
ORDER BY table_name;
Records Updated in Last Hour
SELECT COUNT(*) AS new_records
FROM your_table
WHERE updated_at >= NOW() - INTERVAL 1 HOUR;
Before Importing to n8n
Complete these steps before importing
UPDATED_mysql_db_sync_master_workflow.json:
⚠
Replace Credential IDs
Swap
HOSTINGER_CREDENTIAL_ID, A2_CREDENTIAL_ID, LOCAL_CREDENTIAL_ID with your actual n8n credential IDs
⚠
Replace Table Names
Replace all
'your_table_name' placeholders with your actual table name across all nodes
⚠
Adjust Column Names in UPSERT Queries
Update column names in all UPSERT nodes — defaults are
id, name, email, updated_at — match your actual schema
⚠
Replace Webhook URLs
Set your webhook endpoint in
WF4: Send Alert and WF5: Send Recovery Notification nodesCommon Issues & Fixes
Can't connect to Local MySQL
Check Fortinet policy · verify n8n egress IPs whitelisted · port 3306 open to 10.10.20.11
Can't connect to A2 Hosting
cPanel → Remote MySQL Access → ensure % wildcard added
Incremental sync missing changes
Verify updated_at has ON UPDATE CURRENT_TIMESTAMP on all 3 DBs
Failover flag stuck on 'failover'
Run WF5 manually, or:
UPDATE sync_log SET status='success'Full sync timeout
Use SplitInBatches node · increase n8n timeout setting