惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
腾讯CDC
S
SegmentFault 最新的问题
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Hacker News
The Hacker News
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
B
Blog
IT之家
IT之家
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Recent Announcements
Recent Announcements
H
Hacker News: Front Page
AI
AI
I
InfoQ
H
Heimdal Security Blog
T
Threatpost
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
W
WeLiveSecurity
SecWiki News
SecWiki News
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
O
OpenAI News
阮一峰的网络日志
阮一峰的网络日志
T
Troy Hunt's Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
T
Tor Project blog
有赞技术团队
有赞技术团队
Schneier on Security
Schneier on Security
Last Week in AI
Last Week in AI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Moving Your On-Premises Database to the Cloud
Fu'ad Husnan · 2026-06-28 · via DEV Community

The decision to migrate an on-premises database to the cloud is rarely a simple one. It touches infrastructure, budget, team workflows, and application uptime all at once. Yet for most organizations, moving your on-premises database to the cloud is no longer a question of if but when — and more importantly, how to do it without bringing production systems to their knees. Whether you're running PostgreSQL on bare metal or SQL Server in a company-owned data center, the path to cloud-hosted data has predictable pitfalls and, when navigated carefully, significant payoffs.

This guide walks through the full migration process: from pre-migration assessment to post-migration validation, with real configuration examples and the kind of hard-won detail that vendor documentation tends to skip.

Why Organizations Make the Move

On-premises databases carry hidden costs that compound over time. Hardware refresh cycles, licensing renewals, physical security, power, and cooling — these expenses are easy to underestimate when they're already baked into the operating budget. Cloud databases shift that burden to a consumption model, where you pay for what you use and scale without a procurement cycle.

Beyond cost, there's the question of availability. Cloud providers like AWS, Google Cloud, and Azure run managed database services with built-in replication, automated failover, and point-in-time recovery that would take a dedicated DBA weeks to configure manually. A startup can get enterprise-grade durability out of the box. A mid-sized company can stop worrying about what happens when a hard drive fails at 2 a.m.

Performance is another draw — though it comes with caveats. Managed cloud databases excel at read-heavy workloads and benefit from proximity to cloud-native application services. Latency-sensitive operations or highly custom storage configurations sometimes perform better on dedicated hardware. Knowing which category your workload falls into is the first real question to answer.

Pre-Migration Assessment: Know Before You Move

Skipping the assessment phase is the single biggest mistake teams make. It leads to unexpected downtime, missed dependencies, and — in the worst cases — data loss. A thorough pre-migration audit covers four areas: data volume, schema complexity, application dependencies, and compliance requirements.

Start with a size inventory. You need to know not just the total database size but the distribution across tables, the presence of large object (LOB) columns, and historical growth rates. A 500 GB database that grows 10 GB per week needs a different migration strategy than one that's been static for two years.

Schema complexity matters because cloud databases don't always support every feature of their on-premises equivalents. Oracle-to-PostgreSQL migrations, for example, frequently surface issues around stored procedures, custom data types, and sequences. AWS Schema Conversion Tool (SCT) and pgloader are useful here, but they produce conversion reports, not magic. You'll still need a developer to review the flagged objects.

Application dependencies are where migrations often stall. Query your connection pool configurations, hardcoded IP addresses, and any application code that references the database hostname directly. A migration that takes two days of database work can turn into two weeks when four applications need their connection strings updated and tested.

Choosing a Migration Strategy

There are three broad approaches to database migration: lift-and-shift, heterogeneous migration, and phased cutover. Each has a different risk profile and time-to-value.

Lift-and-Shift

Lift-and-shift moves the database engine and data as-is to a cloud VM, without changing the database software or schema. It's the fastest path and produces the fewest surprises, but it doesn't take advantage of managed services. You're still responsible for patching, backups, and HA configuration.

This strategy makes sense when deadlines are tight, when the application is tightly coupled to a specific database version, or when the migration is a step toward eventual modernization rather than the destination.

Heterogeneous Migration

A heterogeneous migration moves data between different database engines — Oracle to Aurora PostgreSQL, SQL Server to Cloud Spanner, MySQL to AlloyDB. This is the most complex and highest-reward approach. You get schema compatibility improvements, cost reductions from license elimination, and cloud-native performance features. But it requires rigorous application testing because even minor behavioral differences between SQL dialects can cause subtle bugs.

AWS Database Migration Service (DMS) handles the data movement portion, while SCT handles schema conversion. Here's a minimal DMS replication task configuration for a continuous replication job:

{
  "TargetMetadata": {
    "TargetSchema": "",
    "SupportLobs": true,
    "FullLobMode": false,
    "LobChunkSize": 64,
    "LimitedSizeLobMode": true,
    "LobMaxSize": 32768
  },
  "FullLoadSettings": {
    "TargetTablePrepMode": "DROP_AND_CREATE",
    "CreatePkAfterFullLoad": false,
    "StopTaskCachedChangesApplied": false,
    "StopTaskCachedChangesNotApplied": false,
    "MaxFullLoadSubTasks": 8,
    "TransactionConsistencyTimeout": 600,
    "CommitRate": 50000
  },
  "Logging": {
    "EnableLogging": true,
    "LogComponents": [
      { "Id": "SOURCE_UNLOAD", "Severity": "LOGGER_SEVERITY_DEFAULT" },
      { "Id": "TARGET_LOAD", "Severity": "LOGGER_SEVERITY_DEFAULT" },
      { "Id": "TASK_MANAGER", "Severity": "LOGGER_SEVERITY_DEFAULT" }
    ]
  }
}

The FullLobMode: false setting combined with LimitedSizeLobMode: true is a common performance optimization — it handles most LOB columns efficiently while avoiding the full-scan overhead that comes from treating all LOBs as potentially massive.

Phased Cutover

Phased cutover uses change data capture (CDC) to keep the source and target databases synchronized while the application continues running. Once the target is caught up and validated, traffic is switched over with minimal downtime — often under a minute.

This is the preferred approach for production systems where extended downtime isn't acceptable. The tradeoff is complexity: you're running two databases in parallel, which requires careful monitoring and a clear rollback plan.

Setting Up Change Data Capture

CDC works by reading the database transaction log and replicating changes to the target in near real-time. PostgreSQL exposes this via logical replication; MySQL uses binary log (binlog) replication; SQL Server uses CDC tables backed by the transaction log.

For PostgreSQL-to-PostgreSQL migrations, you can set up logical replication with a publication and subscription:

-- On the source database
ALTER SYSTEM SET wal_level = 'logical';
SELECT pg_reload_conf();

CREATE PUBLICATION migration_pub FOR ALL TABLES;

-- On the target database
CREATE SUBSCRIPTION migration_sub
  CONNECTION 'host=source-db.internal port=5432 dbname=myapp user=replicator password=secret'
  PUBLICATION migration_pub;

Once the subscription is active, PostgreSQL streams all inserts, updates, and deletes from source to target. You can monitor lag with pg_stat_subscription:

SELECT subname, received_lsn, latest_end_lsn,
       (latest_end_lsn - received_lsn) AS lag_bytes
FROM pg_stat_subscription;

A lag of zero bytes means the target is caught up. That's your signal that the cutover window is ready.

Cutover Execution and Rollback Planning

The actual cutover has a predictable sequence: stop writes to the source, confirm the target has caught up, update connection strings, verify application connectivity, then remove the replication slot. Each step should be documented with a time estimate and a rollback step.

What many migration guides leave out is the importance of a tested rollback. Before executing the cutover, run a dry run in staging that includes the rollback path. Can you repoint applications back to the source database in under five minutes? Is there a runbook that anyone on the team can follow at midnight? These aren't hypothetical questions — they're the difference between a controlled incident and a crisis.

Communication matters too. Coordinate the maintenance window with product teams and customer support. Even a migration with near-zero downtime should have a status page entry and a prepared message for users in case something unexpected occurs.

Post-Migration Validation

A migration isn't done when the data lands in the cloud. It's done when you've confirmed the data is correct and the application behaves identically. Row count checks are the minimum — not the finish line.

Run a checksum comparison on critical tables:

-- Run on both source and target; checksums should match
SELECT MD5(CAST((array_agg(t.* ORDER BY id)) AS TEXT))
FROM your_table t;

Beyond checksums, replay a sample of recent production queries against the target and compare execution plans. Query planner behavior can differ between environments — particularly if the cloud database was initialized without running ANALYZE or if index statistics are stale.

Monitor application error rates and slow query logs for the first 48 hours post-migration. This window captures most regression issues before they compound into bigger problems. Set up alerting on database CPU, connection counts, and replication lag (if you've kept the source running as a fallback).

Conclusion

Migrating an on-premises database to the cloud is a project with real complexity — but it's entirely manageable when you work through it systematically. Assess before you plan, plan before you execute, and validate before you celebrate. The teams that have the smoothest migrations are almost always the ones that invested the most time in the pre-migration phase, built a tested rollback, and resisted the urge to rush the cutover.

If you're starting this process, begin with a data inventory and a dependency audit this week. Even if the migration is months away, that groundwork shapes every decision that follows. The cloud isn't a destination you arrive at — it's a platform you migrate to with intention.