← Back to Operations Hub
Operations Hub · Runbook

ActiveCampaign Migration — Phase 1.5 Restore-Test Runbook

This is the proof step after the export. The job of Phase 1.5 is to show the backup set can actually be restored, inspected, reconciled, and trusted before any real migration or decommissioning work continues.

Date
April 22, 2026
Owner
David / Jane
Primary Goal
Prove the backup restores
Rule
Never restore into production
Definition of done: one safe restore destination is created, the export set is reloaded there, counts reconcile against the manifest, sample-record checks pass, suppression survives, and findings are written into a restore-test report.

Quick navigation

0. Ground rule

This is not a production import.

Do not restore into live ActiveCampaign, live Supabase production tables, live GoHighLevel production records, or any system currently sending email or running automations.

Restore only into a quarantined test destination.

1. Inputs required

Local archive

/root/.openclaw/workspace/Exports/activecampaign-migration-2026-04-22/

Manifest

/root/.openclaw/workspace/Exports/activecampaign-migration-2026-04-22/manifests/export-manifest-2026-04-22.md

Use the completed Phase 1 export set as the fixed source snapshot for the restore test.

2. Restore destination options

Recommended — Temporary Supabase project

Best match for future master-database direction. Safest place to validate restored counts, sample records, and suppression state.

Fallback — Local PostgreSQL restore DB

Use temporary tables in a local Postgres database if spinning up a separate Supabase project is blocked.

Not allowed

No restore into anything sharing live integrations, sending infrastructure, or customer-facing workflows.

3. Restore folder structure

Create a dedicated restore workspace:

mkdir -p /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/{source,working,sql,reports}

Copy the export set into source so the test runs on a fixed snapshot:

cp -R /root/.openclaw/workspace/Exports/activecampaign-migration-2026-04-22/* \
  /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/source/

Create the report file:

touch /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/reports/restore-test-report-2026-04-22.md

4. Expected baseline counts

The manifest is the source of truth. Current expected values are:

ActiveCampaign

  • contacts: 25935
  • tags: 112
  • custom fields: 44
  • lists: 6
  • unsubscribes: 81
  • automations: 30
  • contact_tags: 81183
  • field_values: 34181
  • contact_lists: 34191

Supabase

  • contacts: 195
  • purchases: 195
  • email_suppressions: 1
  • leads: 198

Payments

  • Stripe customers: 4639
  • Stripe payments: 33368
  • PayPal transactions: 5964

5. Restore-test scope

This phase is about proof, not perfect production recreation.

6. Restore procedure

6.1 Verify source files before import

find /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/source -type f | sort
head -n 3 /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/source/activecampaign/ac-contacts-2026-04-22.csv
head -n 3 /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/source/supabase/supabase-purchases-2026-04-22.csv
head -n 3 /root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/source/payments/stripe-payments-2026-04-22.csv

Stop immediately if files are missing, malformed, truncated, or headerless.

6.2 Create restore tables

Minimum restore tables:

If using PostgreSQL directly:

\copy restore_ac_contacts FROM '/absolute/path/to/ac-contacts-2026-04-22.csv' CSV HEADER;

6.3 Load suppression data early

Restore these first:

If suppression state fails, pause the whole restore test.

7. Validation checks

7.1 Row-count reconciliation

| dataset | expected | restored | pass/fail | notes |
|---|---:|---:|---|---|
| ac_contacts | 25935 |  |  |  |
| ac_tags | 112 |  |  |  |
| ac_unsubscribes | 81 |  |  |  |
| sb_contacts | 195 |  |  |  |
| sb_purchases | 195 |  |  |  |
| sb_email_suppressions | 1 |  |  |  |
| sb_leads | 198 |  |  |  |
| stripe_customers | 4639 |  |  |  |
| stripe_payments | 33368 |  |  |  |
| paypal_transactions | 5964 |  |  |  |

7.2 Sample-record verification

Check at least 5 records total:

7.3 Suppression survival test

This is mandatory. Prove at least one AC unsubscribe row and one Supabase suppression row survive the restore with state intact.

7.4 Purchase continuity test

Prove at least one purchaser can still be traced through contact identity, purchase row, and payment evidence where available.

8. Restore-test report template

/root/.openclaw/workspace/Restores/activecampaign-migration-restore-test-2026-04-22/reports/restore-test-report-2026-04-22.md
# Restore Test Report — 2026-04-22

## Destination
- type:
- environment:
- isolated from production: yes / no

## Source archive used
- local path:
- manifest path:

## Row-count reconciliation
| dataset | expected | restored | pass/fail | notes |
|---|---:|---:|---|---|

## Sample-record checks
- sample 1:
- sample 2:
- sample 3:
- sample 4:
- sample 5:

## Suppression verification
- AC unsubscribe restored:
- Supabase suppression restored:
- result:

## Issues found
-

## Final verdict
- PASS / FAIL / PASS WITH WARNINGS

## Recommendation
- safe to proceed to migration planning: yes / no

9. Pass / fail rules

PASS

Counts materially correct, sample records match, suppression intact, and no unexplained corruption.

PASS WITH WARNINGS

Only small, explained formatting issues. Suppression safety still intact.

FAIL

Missing suppression, material count mismatches, untrusted destination, or sample records that do not match source.

10. Stop conditions

Do not continue to broader migration until these are resolved.

11. Recommendation after Phase 1.5

If restore test passes:

  1. freeze the validated archive set
  2. preserve the restore-test report with the manifest
  3. move into migration mapping and staged cutover planning
  4. keep ActiveCampaign live until staged reconciliation is complete

If restore test fails:

  1. document the failure clearly
  2. fix the archive or restore process
  3. rerun Phase 1.5
  4. do not proceed to decommissioning decisions

A backup is not proven until it restores.