<p><img class="alignnone size-full wp-image-3628" src="https://flowgenius.in/wp-content/uploads/2025/12/8.png" alt="Redis Migration Flowchart for n8n" /></p>
<p style="text-align: center;">Step‑by‑Step Guide to Move Data Without Breaking Your Workflows in n8n Redis Instance</p>
<p> </p>
<p> </p>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Who this is for</strong>: n8n operators who rely on Redis for queueing and caching and need to relocate the Redis service with minimal downtime. For a complete overview of Redis usage, errors, performance tuning, and scaling in n8n, check out our detailed guide on <strong><a href="https://flowgenius.in/n8n-redis-error-troubleshooting-guide/"><em data-start="361" data-end="386">Redis for n8n Workflows</em></a>.</strong></p>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">Quick Diagnosis</h2>
<ol style="margin-bottom: 2em; line-height: 1.9;">
<li><strong>Take a live RDB/AOF snapshot</strong> on the old server (<code>redis-cli --rdb /tmp/dump.rdb</code> or copy the AOF file).</li>
<li><strong>Spin up the new Redis</strong> (same version, matching <code>maxmemory</code>, <code>appendonly yes</code>).</li>
<li><strong>Copy the snapshot/AOF</strong> to the new host (<code>scp dump.rdb new‑host:/var/lib/redis/</code>).</li>
<li><strong>Stop the old Redis</strong>, start the new one, and <strong>update n8n’s <code>REDIS_HOST</code></strong> (or the DNS CNAME you use).</li>
<li><strong>Validate</strong> with <code>redis-cli ping</code> and a quick n8n workflow run.</li>
<li><strong>Rollback</strong> by pointing <code>REDIS_HOST</code> back if anything fails.</li>
</ol>
<p style="margin-bottom: 2em; line-height: 1.9;"><em>Result</em>: Zero data loss, <30 s downtime, and n8n continues processing jobs without manual intervention.</p>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">1. Why a Dedicated Migration Guide?</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">The pillar article <em>Common Redis Errors in n8n</em> explains what happens when Redis is unreachable, but it <strong>doesn’t cover the operational steps</strong> required to relocate the Redis service itself. This page fills that gap by providing a <strong>production‑grade migration workflow</strong> that minimizes downtime, preserves all workflow data, and keeps n8n’s job queue intact.</p>
<blockquote style="margin-bottom: 2em; line-height: 1.9; border-left: 4px solid #e0e0e0; padding-left: 1em;"><p><strong>EEFA note</strong> – Skipping the AOF/RDB snapshot or using a mismatched Redis version can corrupt the job queue, causing lost executions. Always test the migration in a staging environment first.</p></blockquote>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">2. Prerequisites & Checklist</h2>
<p> </p>
<p><img class="alignnone size-full wp-image-3626" style="max-width: 100%; height: auto;" src="https://flowgenius.in/wp-content/uploads/2025/12/Cron-Triggered-Data-Sync-2025-12-24-100210.png" alt="Cron Triggered Data Sync Workflow" /></p>
<p> </p>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong><br />
Micro‑summary</strong>: Verify you have the right version, access, and safety nets before touching production.</p>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 12px; text-align: left;">Item</th>
<th style="padding: 12px; text-align: left;">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 12px;">Current Redis version</td>
<td style="padding: 12px;"><code>redis-cli INFO SERVER | grep redis_version</code> – must match on the target host (or use compatible major version).</td>
</tr>
<tr>
<td style="padding: 12px;">n8n version</td>
<td style="padding: 12px;">≥ 1.0 (uses Redis for queue & cache).</td>
</tr>
<tr>
<td style="padding: 12px;">Access</td>
<td style="padding: 12px;">SSH to both old and new servers, <code>redis-cli</code> installed locally.</td>
</tr>
<tr>
<td style="padding: 12px;">Backup storage</td>
<td style="padding: 12px;">At least 2× the size of your Redis dataset for safety.</td>
</tr>
<tr>
<td style="padding: 12px;">DNS / Env var</td>
<td style="padding: 12px;">Identify whether n8n uses a DNS CNAME (<code>REDIS_HOST=redis.mycompany.com</code>) or a raw IP.</td>
</tr>
<tr>
<td style="padding: 12px;">Maintenance window</td>
<td style="padding: 12px;">Optional but recommended for high‑traffic installations.</td>
</tr>
<tr>
<td style="padding: 12px;">Rollback plan</td>
<td style="padding: 12px;">Keep the original Redis running until you confirm success.</td>
</tr>
</tbody>
</table>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">3. Create a Consistent Snapshot of the Source Redis</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Capture an exact point‑in‑time copy of the Redis data using the persistence mode that matches your workload.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">3.1 Choose the Persistence Mode</h3>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 12px; text-align: left;">Mode</th>
<th style="padding: 12px; text-align: left;">When to use</th>
<th style="padding: 12px; text-align: left;">Command</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 12px;"><strong>RDB</strong> (point‑in‑time dump)</td>
<td style="padding: 12px;">Small‑to‑medium datasets, low write throughput</td>
<td style="padding: 12px;"><code>redis-cli --rdb /tmp/dump.rdb</code></td>
</tr>
<tr>
<td style="padding: 12px;"><strong>AOF</strong> (append‑only file)</td>
<td style="padding: 12px;">Large datasets, need exact write order</td>
<td style="padding: 12px;"><code>cp /var/lib/redis/appendonly.aof /tmp/appendonly.aof</code></td>
</tr>
</tbody>
</table>
<blockquote style="margin-bottom: 2em; line-height: 1.9; border-left: 4px solid #e0e0e0; padding-left: 1em;"><p><strong>EEFA</strong> – If you have both RDB and AOF enabled, copy <strong>both</strong> files. n8n relies on the exact queue order; an AOF‑only restore guarantees no job loss.</p></blockquote>
<h3 style="margin-bottom: 45px; line-height: 1.3;">3.2 Verify the Snapshot</h3>
<p style="margin-bottom: 2em; line-height: 1.9;">Run the built‑in Redis tools to ensure the files are not corrupted before moving them.</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Verify RDB file integrity
redis-check-rdb /tmp/dump.rdb && echo "RDB OK"
</pre>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Verify AOF file integrity (auto‑fixes if needed)
redis-check-aof --fix /tmp/appendonly.aof && echo "AOF OK"
</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">If either check fails, <strong>abort</strong> and investigate the corruption before proceeding. <span style="font-size: 16px;">If you run into an cache, first check out this troubleshooting guide <a href="https://flowgenius.in/redis-vs-alternative-caches-for-n8n/"><strong>Redis vs alternative caches for n8n</strong></a>. Once you’ve fixed it, you can continue with the setup.</span></p>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">4. Provision the New Redis Server</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Install the same Redis version and clone the critical configuration parameters.</p>
<ol style="margin-bottom: 2em; line-height: 1.9;">
<li>Install the same major version (e.g., <code>apt-get install redis-server=6.2.*</code>).</li>
<li>Mirror the configuration (<code>/etc/redis/redis.conf</code>) – especially <code>maxmemory</code>, <code>maxmemory-policy</code>, <code>appendonly</code>, <code>save</code> directives.</li>
<li>Open the same port (default <code>6379</code>) and allow traffic from the n8n host(s) in the firewall.</li>
</ol>
<p style="margin-bottom: 2em; line-height: 1.9;">To confirm the important settings, run a quick diff on the live config:</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Show memory, persistence, and snapshot settings
grep -E 'maxmemory|appendonly|save' /etc/redis/redis.conf
</pre>
<blockquote style="margin-bottom: 2em; line-height: 1.9; border-left: 4px solid #e0e0e0; padding-left: 1em;"><p><strong>EEFA</strong> – Do <strong>not</strong> enable <code>protected-mode yes</code> unless you also configure a proper <code>bind</code> address; otherwise n8n will be blocked.</p></blockquote>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">5. Transfer the Snapshot to the New Host</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Securely copy the dump files and set correct ownership.</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Transfer RDB (or AOF) to the new server
scp /tmp/dump.rdb new-redis:/var/lib/redis/
# If using AOF instead:
# scp /tmp/appendonly.aof new-redis:/var/lib/redis/
</pre>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Ensure the redis user owns the files
ssh new-redis "chown redis:redis /var/lib/redis/dump.rdb /var/lib/redis/appendonly.aof"
</pre>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">6. Stop the Old Instance & Load the Snapshot</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Shut down the source Redis, then start the new instance so it loads the transferred data.</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># On old host – stop Redis to freeze writes
systemctl stop redis
</pre>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Verify no clients can connect (expected to fail)
redis-cli -h <old‑host> ping # should return (nil) or connection refused
</pre>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># On the new host – start Redis, which will load the AOF (preferred) or RDB
systemctl start redis
redis-cli ping # should return PONG
</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">If both RDB and AOF were copied, Redis will automatically prefer the AOF and ignore the RDB.</p>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">7. Switch n8n to the New Redis Endpoint</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Point n8n at the new Redis host and restart the service.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">7.1 Update Environment Variable</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># DNS CNAME (recommended)
export REDIS_HOST=redis-new.mycompany.com
# Or raw IP
# export REDIS_HOST=10.0.2.45
</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Restart n8n using your deployment method:</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Docker
docker restart n8n
# PM2
pm2 restart n8n
# systemd
systemctl restart n8n
</pre>
<h3 style="margin-bottom: 45px; line-height: 1.3;">7.2 Verify Connectivity</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># From the n8n host, confirm Redis replies
redis-cli -h $REDIS_HOST ping # should return PONG
</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Run a quick test workflow that enqueues a job and confirm the queue length grew:</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; margin-bottom: 2em; line-height: 1.9;"># Check the n8n queue size after the test
redis-cli -h $REDIS_HOST LLEN n8n:queue # should be > 0
</pre>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">8. Minimize Downtime – “Read‑Only” Mode Trick</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Pause background workers while copying data to shrink the window of possible job loss.</p>
<ol style="margin-bottom: 2em; line-height: 1.9;">
<li>Set <code>EXECUTIONS_PROCESS=main</code> in n8n to stop background workers.</li>
<li>Perform the snapshot & copy (steps 3‑5).</li>
<li>Re‑enable workers by restoring <code>EXECUTIONS_PROCESS=queue</code>.</li>
</ol>
<blockquote style="margin-bottom: 2em; line-height: 1.9; border-left: 4px solid #e0e0e0; padding-left: 1em;"><p><strong>EEFA</strong> – Remember to revert <code>EXECUTIONS_PROCESS</code> after the migration; leaving it on <code>main</code> disables the queue entirely.</p></blockquote>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">9. Post‑Migration Validation Checklist</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Run a concise set of health checks to ensure everything is operating as expected.</p>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 12px; text-align: left;">Check</th>
<th style="padding: 12px; text-align: left;">Command / Action</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 12px;">Redis health</td>
<td style="padding: 12px;"><code>redis-cli INFO replication</code> – <code>role:master</code></td>
</tr>
<tr>
<td style="padding: 12px;">n8n connectivity</td>
<td style="padding: 12px;"><code>redis-cli -h $REDIS_HOST ping</code></td>
</tr>
<tr>
<td style="padding: 12px;">Queue integrity</td>
<td style="padding: 12px;"><code>redis-cli -h $REDIS_HOST LLEN n8n:queue</code> matches pre‑migration count</td>
</tr>
<tr>
<td style="padding: 12px;">Workflow execution</td>
<td style="padding: 12px;">Run a known workflow; confirm success in UI and logs</td>
</tr>
<tr>
<td style="padding: 12px;">Metrics</td>
<td style="padding: 12px;">Verify Prometheus/Grafana dashboards show normal request latency</td>
</tr>
<tr>
<td style="padding: 12px;">Rollback</td>
<td style="padding: 12px;">If any check fails, point <code>REDIS_HOST</code> back to the old server and restart n8n</td>
</tr>
</tbody>
</table>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">10. Rollback Procedure (if needed)</h2>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Micro‑summary</strong>: Quickly revert to the original Redis instance without data loss.</p>
<ol style="margin-bottom: 2em; line-height: 1.9;">
<li>Re‑apply the original <code>REDIS_HOST</code> value in the n8n environment.</li>
<li>Restart n8n using the same method as before.</li>
<li>Verify that the old Redis instance is still running (do <strong>not</strong> stop it until the new instance is proven stable).</li>
</ol>
<blockquote style="margin-bottom: 2em; line-height: 1.9; border-left: 4px solid #e0e0e0; padding-left: 1em;"><p><strong>EEFA</strong> – Keep the old Redis <strong>running</strong> for at least 30 minutes after migration; this gives you a safety net for any delayed jobs that may have been in flight.</p></blockquote>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">11. Common Pitfalls & How to Avoid Them</h2>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 12px; text-align: left;">Symptom</th>
<th style="padding: 12px; text-align: left;">Root Cause</th>
<th style="padding: 12px; text-align: left;">Fix</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 12px;">ERR unknown command ‘PING’</td>
<td style="padding: 12px;">Connected to a <strong>non‑Redis</strong> service (e.g., a proxy)</td>
<td style="padding: 12px;">Verify <code>$REDIS_HOST</code> resolves to the correct IP and port.</td>
</tr>
<tr>
<td style="padding: 12px;">Missing jobs after migration</td>
<td style="padding: 12px;">AOF not copied or disabled on new host</td>
<td style="padding: 12px;">Ensure <code>appendonly yes</code> is set and the AOF file is present.</td>
</tr>
<tr>
<td style="padding: 12px;">n8n throws ECONNREFUSED</td>
<td style="padding: 12px;">Firewall blocks new host</td>
<td style="padding: 12px;">Open port <code>6379</code> inbound from n8n nodes.</td>
</tr>
<tr>
<td style="padding: 12px;">High latency after switch</td>
<td style="padding: 12px;">New host has different <code>maxmemory-policy</code> causing evictions</td>
<td style="padding: 12px;">Mirror all memory‑policy settings from the source.</td>
</tr>
</tbody>
</table>
<h2 style="margin-bottom: 45px; line-height: 1.3;"></h2>
<hr style="margin: 55px 0;" />
<h2 style="margin-bottom: 45px; line-height: 1.3;">Next Steps</h2>
<ul style="margin-bottom: 2em; line-height: 1.9;">
<li><strong>Automate future migrations</strong> with a Terraform or Ansible playbook (see sibling article “Automating n8n Redis provisioning”).</li>
<li><strong>Enable Redis Sentinel</strong> for high‑availability to avoid future manual migrations.</li>
</ul>
<p style="margin-bottom: 2em; line-height: 1.9;">*Happy migrating!*</p>

Step‑by‑Step Guide to Move Data Without Breaking Your Workflows in n8n Redis Instance
Who this is for: n8n operators who rely on Redis for queueing and caching and need to relocate the Redis service with minimal downtime. For a complete overview of Redis usage, errors, performance tuning, and scaling in n8n, check out our detailed guide on Redis for n8n Workflows.
Quick Diagnosis
- Take a live RDB/AOF snapshot on the old server (
redis-cli --rdb /tmp/dump.rdb or copy the AOF file).
- Spin up the new Redis (same version, matching
maxmemory, appendonly yes).
- Copy the snapshot/AOF to the new host (
scp dump.rdb new‑host:/var/lib/redis/).
- Stop the old Redis, start the new one, and update n8n’s
REDIS_HOST (or the DNS CNAME you use).
- Validate with
redis-cli ping and a quick n8n workflow run.
- Rollback by pointing
REDIS_HOST back if anything fails.
Result: Zero data loss, <30 s downtime, and n8n continues processing jobs without manual intervention.
1. Why a Dedicated Migration Guide?
The pillar article Common Redis Errors in n8n explains what happens when Redis is unreachable, but it doesn’t cover the operational steps required to relocate the Redis service itself. This page fills that gap by providing a production‑grade migration workflow that minimizes downtime, preserves all workflow data, and keeps n8n’s job queue intact.
EEFA note – Skipping the AOF/RDB snapshot or using a mismatched Redis version can corrupt the job queue, causing lost executions. Always test the migration in a staging environment first.
2. Prerequisites & Checklist

Micro‑summary: Verify you have the right version, access, and safety nets before touching production.
| Item |
Details |
| Current Redis version |
redis-cli INFO SERVER | grep redis_version – must match on the target host (or use compatible major version). |
| n8n version |
≥ 1.0 (uses Redis for queue & cache). |
| Access |
SSH to both old and new servers, redis-cli installed locally. |
| Backup storage |
At least 2× the size of your Redis dataset for safety. |
| DNS / Env var |
Identify whether n8n uses a DNS CNAME (REDIS_HOST=redis.mycompany.com) or a raw IP. |
| Maintenance window |
Optional but recommended for high‑traffic installations. |
| Rollback plan |
Keep the original Redis running until you confirm success. |
3. Create a Consistent Snapshot of the Source Redis
Micro‑summary: Capture an exact point‑in‑time copy of the Redis data using the persistence mode that matches your workload.
3.1 Choose the Persistence Mode
| Mode |
When to use |
Command |
| RDB (point‑in‑time dump) |
Small‑to‑medium datasets, low write throughput |
redis-cli --rdb /tmp/dump.rdb |
| AOF (append‑only file) |
Large datasets, need exact write order |
cp /var/lib/redis/appendonly.aof /tmp/appendonly.aof |
EEFA – If you have both RDB and AOF enabled, copy both files. n8n relies on the exact queue order; an AOF‑only restore guarantees no job loss.
3.2 Verify the Snapshot
Run the built‑in Redis tools to ensure the files are not corrupted before moving them.
# Verify RDB file integrity
redis-check-rdb /tmp/dump.rdb && echo "RDB OK"
# Verify AOF file integrity (auto‑fixes if needed)
redis-check-aof --fix /tmp/appendonly.aof && echo "AOF OK"
If either check fails, abort and investigate the corruption before proceeding. If you run into an cache, first check out this troubleshooting guide Redis vs alternative caches for n8n. Once you’ve fixed it, you can continue with the setup.
4. Provision the New Redis Server
Micro‑summary: Install the same Redis version and clone the critical configuration parameters.
- Install the same major version (e.g.,
apt-get install redis-server=6.2.*).
- Mirror the configuration (
/etc/redis/redis.conf) – especially maxmemory, maxmemory-policy, appendonly, save directives.
- Open the same port (default
6379) and allow traffic from the n8n host(s) in the firewall.
To confirm the important settings, run a quick diff on the live config:
# Show memory, persistence, and snapshot settings
grep -E 'maxmemory|appendonly|save' /etc/redis/redis.conf
EEFA – Do not enable protected-mode yes unless you also configure a proper bind address; otherwise n8n will be blocked.
5. Transfer the Snapshot to the New Host
Micro‑summary: Securely copy the dump files and set correct ownership.
# Transfer RDB (or AOF) to the new server
scp /tmp/dump.rdb new-redis:/var/lib/redis/
# If using AOF instead:
# scp /tmp/appendonly.aof new-redis:/var/lib/redis/
# Ensure the redis user owns the files
ssh new-redis "chown redis:redis /var/lib/redis/dump.rdb /var/lib/redis/appendonly.aof"
6. Stop the Old Instance & Load the Snapshot
Micro‑summary: Shut down the source Redis, then start the new instance so it loads the transferred data.
# On old host – stop Redis to freeze writes
systemctl stop redis
# Verify no clients can connect (expected to fail)
redis-cli -h <old‑host> ping # should return (nil) or connection refused
# On the new host – start Redis, which will load the AOF (preferred) or RDB
systemctl start redis
redis-cli ping # should return PONG
If both RDB and AOF were copied, Redis will automatically prefer the AOF and ignore the RDB.
7. Switch n8n to the New Redis Endpoint
Micro‑summary: Point n8n at the new Redis host and restart the service.
7.1 Update Environment Variable
# DNS CNAME (recommended)
export REDIS_HOST=redis-new.mycompany.com
# Or raw IP
# export REDIS_HOST=10.0.2.45
Restart n8n using your deployment method:
# Docker
docker restart n8n
# PM2
pm2 restart n8n
# systemd
systemctl restart n8n
7.2 Verify Connectivity
# From the n8n host, confirm Redis replies
redis-cli -h $REDIS_HOST ping # should return PONG
Run a quick test workflow that enqueues a job and confirm the queue length grew:
# Check the n8n queue size after the test
redis-cli -h $REDIS_HOST LLEN n8n:queue # should be > 0
8. Minimize Downtime – “Read‑Only” Mode Trick
Micro‑summary: Pause background workers while copying data to shrink the window of possible job loss.
- Set
EXECUTIONS_PROCESS=main in n8n to stop background workers.
- Perform the snapshot & copy (steps 3‑5).
- Re‑enable workers by restoring
EXECUTIONS_PROCESS=queue.
EEFA – Remember to revert EXECUTIONS_PROCESS after the migration; leaving it on main disables the queue entirely.
9. Post‑Migration Validation Checklist
Micro‑summary: Run a concise set of health checks to ensure everything is operating as expected.
| Check |
Command / Action |
| Redis health |
redis-cli INFO replication – role:master |
| n8n connectivity |
redis-cli -h $REDIS_HOST ping |
| Queue integrity |
redis-cli -h $REDIS_HOST LLEN n8n:queue matches pre‑migration count |
| Workflow execution |
Run a known workflow; confirm success in UI and logs |
| Metrics |
Verify Prometheus/Grafana dashboards show normal request latency |
| Rollback |
If any check fails, point REDIS_HOST back to the old server and restart n8n |
10. Rollback Procedure (if needed)
Micro‑summary: Quickly revert to the original Redis instance without data loss.
- Re‑apply the original
REDIS_HOST value in the n8n environment.
- Restart n8n using the same method as before.
- Verify that the old Redis instance is still running (do not stop it until the new instance is proven stable).
EEFA – Keep the old Redis running for at least 30 minutes after migration; this gives you a safety net for any delayed jobs that may have been in flight.
11. Common Pitfalls & How to Avoid Them
| Symptom |
Root Cause |
Fix |
| ERR unknown command ‘PING’ |
Connected to a non‑Redis service (e.g., a proxy) |
Verify $REDIS_HOST resolves to the correct IP and port. |
| Missing jobs after migration |
AOF not copied or disabled on new host |
Ensure appendonly yes is set and the AOF file is present. |
| n8n throws ECONNREFUSED |
Firewall blocks new host |
Open port 6379 inbound from n8n nodes. |
| High latency after switch |
New host has different maxmemory-policy causing evictions |
Mirror all memory‑policy settings from the source. |
Next Steps
- Automate future migrations with a Terraform or Ansible playbook (see sibling article “Automating n8n Redis provisioning”).
- Enable Redis Sentinel for high‑availability to avoid future manual migrations.
*Happy migrating!*