Database Migration: Strategies, Risks, and Guarantees
Database migration is technically the riskiest stage of infrastructure work. Data loss or site unavailability during the transfer has direct financial consequences: one hour of downtime for an online store can translate into tens of thousands of dollars in lost revenue, and damaged order tables can be an irreparable blow to reputation. Experienced engineers know: 80% of problems arise from unaccounted dependencies, DBMS version incompatibility, or lack of a test rollback. Our team performs turnkey migrations with integrity guarantees and minimal downtime, backed by over a decade of practice and dozens of successful projects. We don't just copy data — we design a safe transition with zero business risk.
How to choose a migration strategy based on downtime?
The choice of strategy is driven by database size, acceptable downtime, and consistency requirements. Below is a comparison of three main approaches.
| Strategy |
Downtime |
Complexity |
Data Loss Risk |
| Maintenance window (dump + transfer) |
Hours |
Low |
Medium (manual dump) |
| Online migration (replication) |
Seconds |
High |
Low (automatic sync) |
| Blue-Green (parallel database) |
Zero |
Very high |
Very low (dual write) |
Maintenance window is the simplest method: put the site in maintenance mode, dump, transfer to the new server, then launch. Suitable for databases up to 10 GB during nighttime. Online migration uses replication: for MySQL — Percona XtraBackup or binlog replication; for PostgreSQL — pglogical or pg_basebackup + WAL shipping. Blue-Green requires two parallel databases — the application writes to both, then switches instantly.
What's included in the database migration work?
- Audit of the current database: schema, size, dependencies, read/write speed. We analyze index types, triggers, and stored procedures.
- Development of a migration plan with strategy selection, test run in an isolated environment, and rollback scenario.
- Replication setup (if applicable) with lag monitoring.
- Execution of the transfer during the maintenance window with minimal user impact.
- Integrity validation — comparing row counts, checksums, and application testing.
- Documentation and training — transferring schema, configs, and maintenance instructions.
We develop a detailed plan for each project, including a test run on a data copy. This minimizes risks.
Why online migration cuts downtime by 10x?
With maintenance window, downtime consists of dumping, transferring, and restoring. For a 50 GB database, this can take 4–5 hours. Online migration with pglogical reduces downtime to seconds: you just switch the application to the new server after full synchronization. Time savings reach 90%. Additionally, online migration continuously syncs changes until the switch, eliminating data loss. This method is especially effective for high-load projects where every hour of downtime is costly.
How is post-migration validation performed?
After the transfer, we automatically compare critical tables:
for table in users posts orders products; do
src=$(mysql -h source -u root -p -se "SELECT COUNT(*) FROM mysite.$table")
dst=$(mysql -h target -u root -p -se "SELECT COUNT(*) FROM mysite.$table")
if [ "$src" != "$dst" ]; then
echo "MISMATCH: $table: $src vs $dst"
else
echo "OK: $table: $src rows"
fi
done
We also check checksums for text fields and test application functionality for 24 hours. If a discrepancy is found, we immediately roll back using a pre-prepared scenario. Data integrity guarantee is contractually binding.
Estimated timelines
| Database Size |
Maintenance window |
Online migration |
| Up to 1 GB |
2–10 min |
1–5 days (planning + execution) |
| 1–10 GB |
10–60 min |
1–5 days |
| 10–100 GB |
1–8 hours |
1–5 days |
| 100 GB+ |
Not recommended |
1–5 days |
Timelines include preparation, test run, and backup. Cost is calculated individually after project assessment.
Common migration mistakes and how to avoid them
- DBMS version incompatibility: check MySQL/PostgreSQL versions on source and target. Different major versions can break indexes.
- Loss of triggers and procedures: use
--routines --triggers flags in mysqldump or --no-owner in pg_dump.
- Lack of rollback plan: always take a full dump before starting and keep it for 48 hours after migration.
Example command for MySQL
# Dump with locking for consistency
mysqldump \
--single-transaction \
--routines \
--triggers \
--events \
--hex-blob \
--default-character-set=utf8mb4 \
-u root -p mysite_db \
| gzip > /backup/mysite_$(date +%Y%m%d_%H%M%S).sql.gz
Example command for PostgreSQL
# Custom format (faster, compressed, parallel restore)
pg_dump \
-U postgres \
-d mysite_db \
-F custom \
-f /backup/mysite_$(date +%Y%m%d).dump \
--verbose
According to PostgreSQL recommendations, logical replication (pglogical) ensures minimal lag. Assess your project — contact us for a free consultation. We'll prepare a migration plan, perform a test run, and ensure a seamless transition. Order a turnkey migration: get a quote within 24 hours.
Website Redesign and Migration: CMS Change, SEO Preservation
A client came to us 6 weeks after a self-attempted redesign: 'We moved from WordPress to Tilda, traffic dropped by 70%.' I opened Google Search Console — 847 pages returned 404, the URL structure had completely changed, not a single 301 redirect was in place. Yandex hadn't reindexed the new site yet, positions collapsed. Recovery took 4 months and resulted in significant revenue loss for the quarter. Our experience — over 7 years and 80+ successful migrations, we guarantee position retention with the right approach.
Why Do Migrations Break SEO?
Search engines have indexed specific URLs. If /catalog/shoes/nike-air-max-270 turned into /products/nike-air-max-270 without a 301 redirect — all the link equity, traffic, and rankings go nowhere. Google says 301 passes ~99% of PageRank, but in practice positions recover over 2–8 weeks, not instantly.
Commonly, SEO gets broken not out of malice, but because a developer doesn't view the URL structure as a public API. Here are typical breakages:
| Problem |
Cause |
Solution |
| Duplicate content |
New site opened parallel to old |
Disable indexing of dev version, set canonical |
| Loss of metadata |
Title and description left in old CMS |
Export via API, mass import with verification |
| Canonical changes |
Pagination and filters reset |
Lock before development, implement in template |
| Speed drop |
Heavy sections, unoptimized images |
Optimize LCP, CLS, TTFB before launch |
How to Recover Traffic After a Failed Migration?
If traffic dropped, act immediately:
- Crawl the new site for 404s and compare with the pre-migration URL list.
- Create redirects for all lost pages with traffic >0.
- Check structured data and meta tags on a test sample.
- Daily monitor Coverage in Search Console and positions for top 50 queries.
- If after 2 weeks traffic does not recover — deep audit of redirects (transitivity, chains, loops).
In our practice, a large e-commerce site lost 50% of traffic when moving from Bitrix to React + Strapi. We restored 95% of redirects in three days, and within 3 weeks traffic returned to 90% of original.
What Does a Pre-Migration Audit Include?
Before starting development on the new site:
- Full crawl of current site via Screaming Frog or Sitebulb. Get list of all indexable URLs with traffic from Google Search Console.
- Export all pages with organic traffic >0 over the last 6 months — these are priority for redirects.
- Record all external backlinks to specific pages — Ahrefs, Semrush.
- Snapshot current positions for key queries — baseline for post-migration comparison.
- Save Core Web Vitals from Search Console for the previous 90 days.
Table for recording:
| Audit Stage |
Tool |
Criticality |
| URL collection |
Screaming Frog + GSC |
High |
| Page traffic |
Google Analytics / Search Console |
High |
| External links |
Ahrefs / Majestic |
Medium |
| Positions |
Yandex Wordstat / Serpstat |
Medium |
| Core Web Vitals |
GSC CrUX |
High |
Contact us for a detailed pre-migration audit — we will help identify all risks and create an action plan.
URL Mapping and Redirects
For projects with 200+ pages, we create a mapping table: old URL → new URL → status (301, merged with another page, deleted). Each row is verified: does the content actually migrate here?
In Laravel, redirects are handled via configuration file and middleware, not .htaccess — faster and more manageable. For WordPress → Next.js: redirects are set in next.config.js (static) and at the Nginx/CDN level for dynamic ones. Old .htaccess on shared hosting with 500+ lines of redirects is a special hell. Each redirect is checked sequentially, performance suffers. We move to Nginx map directive or Redis cache for dynamic lookup. More at Wikipedia: HTTP 301.
How to Migrate Content from Different CMSs?
WordPress → Headless CMS (Contentful, Strapi, Sanity):
WordPress REST API or WP All Export to export posts, meta fields, media files. Migration script in Node.js: parse export, transform structure, upload via CMS API. Media files are reuploaded to new storage, links updated in content. Typical problem — shortcodes in WordPress content ([gallery id="123"]): need parser and transformation to new format.
1C-Bitrix → modern stack:
Bitrix stores content in non-standard tables with IBLOCK_ELEMENT_PROPERTY. Direct SQL export via phpMyAdmin or Bitrix API. Transformation is the longest part due to specific Bitrix data structure.
Heavy WYSIWYG → structured content:
Years of editing in FCKEditor/TinyMCE leave inline styles, non-standard tags, broken attributes. HTML sanitize + transformation to Markdown or Portable Text (Sanity) with manual check of problematic pages.
| CMS |
Migration Tools |
Complexity |
Risks |
| WordPress |
WP All Export, WP-CLI, REST API |
Medium |
Shortcodes, meta fields |
| 1C-Bitrix |
Bitrix API, SQL export |
High |
Complex structure, infoblock properties |
| Joomla |
J2XML, direct DB export |
High |
Outdated extensions |
| Tilda/Readymag |
API export (limited) |
Medium |
No full content access |
How to Preserve Technical SEO Elements During Migration?
Structured data (Schema.org) — if the old site had Product, Article, BreadcrumbList markup, they must be on the new site too. Google Search Console → Enhancement reports will show loss of rich snippets.
Sitemap XML: generated automatically, submitted to GSC a day after launch. Old sitemap remains until full reindexing.
hreflang for multilingual sites: if tags are lost during migration, conflicts between language versions in search results will start within weeks.
Open Graph and Twitter Card meta tags — often forgotten when changing template, pages stop displaying correctly when shared on social networks.
Launch and First Weeks Monitoring
DNS propagation: DNS switching takes up to 48 hours, plan launch with buffer. Cloudflare as DNS provider — propagation takes minutes, not hours.
After launch, monitor daily: Search Console → Coverage (indexing errors), Analytics → organic traffic, year-over-year comparison, crawl site for 404 errors.
First 2 weeks are critical. If traffic drops more than 30% — immediate audit of redirects and comparison with pre-migration crawl.
Launch checklist (spoiler)
- [ ] All 301 redirects work and do not form chains
- [ ] Sitemap submitted to GSC and Yandex.Webmaster
- [ ] Canonical tags set on all pages
- [ ] Open Graph / Twitter Card display checked
- [ ] robots.txt and noindex meta tags adjusted
- [ ] Core Web Vitals in green zone (LCP <2.5s, CLS <0.1, INP <200ms)
What the Service Includes
Results you receive:
- Migration plan with URL mapping and redirects in Excel/Google Sheets format.
- Configured 301 redirects at server level (Nginx/Cloudflare/Vercel).
- Migrated content with integrity check: images, meta fields, links.
- Structured data (Schema.org) on the new site, identical to old or improved.
- SEO report: position trend at 1, 3, and 6 weeks after launch.
- Coverage monitoring in Search Console with error notifications.
- Guaranteed position retention: if traffic drops more than 15% within the first month — free audit and correction.
Timelines and Estimates
- Redesign with migration for a small site (up to 100 pages): 4–8 weeks.
- E-commerce migration with 500+ product pages: 8–16 weeks.
- Only technical migration part (redirects, metadata) without redesign: 1–3 weeks.
Cost is calculated individually based on scope.
Get a consultation for your project — we will respond within a day. Order a pre-migration audit of your site and receive a detailed proposal with a redirect plan. Contact us to discuss details.