News

Data Migration: Strategies, Checklist, Example

· DigifyNow

Auf Deutsch lesen

A data migration runs in three steps. First, export the data from the legacy system. Next, use a mapping table to reshape it into the new system's structure and load it. Before that, do at least one trial run with a copy of the real data. Afterward, compare record counts and totals. Freeze the old system on cutover day only when those numbers match. Don't delete it: tax-relevant records have to be retained.

What is data migration? Definition and how it differs from backups and integrations

A data migration moves your data once from a source system to a target system. The data almost always has to be reshaped along the way, because the two systems store it differently. Technically it takes three steps, known as ETL. Extract means pulling the data out of the legacy system, for example as a CSV file or directly with a database query. Transform means mapping fields, converting formats and merging duplicates. Load means bringing the data into the new system through its import function or an API. Two things often get mixed up with migration. A backup copies data unchanged so you can restore it later. It doesn't touch the structure. An API integration keeps two systems in sync on an ongoing basis, and both of them keep running. A migration, by contrast, has an end point. Once it's done, the new system is the system of record. The old one is shut down or kept in read-only mode. At DigifyNow, migration is almost always part of a larger project. A company that gets custom software or a new back office wants to bring its customers, orders and documents over from the old tool.

This article covers only the move of the data itself: mapping, trial run, reconciliation and cutover. Rolling out a new program as a whole, with key users, training and a pilot phase, is covered in our post on software implementation in eight steps. There, migration is one step among several.

Illustration for the section "What is data migration? Definition and how it differs from backups and integrations"
AI-generated image

What are the main data migration strategies?

In practice there are three strategies. The difference is how long the old and the new system run side by side. Data volume matters less when you pick one. What matters more is how tightly your data areas are linked to each other and how much a day of downtime would cost you.

The three common migration strategies compared
StrategyHow it worksFits whenWhat goes wrong
Big bang (cutover date)All data is moved at once. Then the legacy system switches to read-only mode.The data areas are tightly linked and the move fits into one weekend.One error hits everyone at once. Without a rollback plan prepared in advance, operations stop on Monday.
Phased (in stages)Data moves by area, location or module, for example contacts first and orders after that.The areas can be separated cleanly.During the transition, data has to flow back and forth between two systems. That needs a temporary interface.
Parallel runBoth systems run at the same time for a while, and the results are compared.The new system first has to prove itself on critical processes such as billing.Everything gets entered twice. After a few days, staff usually maintain only one of the two systems, and the comparison loses its value.

For most small and mid-sized businesses, we recommend a big bang with a thorough trial run. A parallel run sounds safe. But it often fails because nobody has time for double data entry in day-to-day work.

Data migration checklist: what has to be settled before the move?

We work through these six points in the same order on every migration project. Each one produces a result you can check. A vague feeling that everything is probably fine isn't enough.

  1. Take inventory: Which tables or files exist, and how many records does each one hold? Which character encoding does the legacy system use (an older Windows code page or Unicode), and which export format does it offer?
  2. Build a mapping table: For every source field, record the target field, the transformation rule and whether it's a required field. Fields with no target are explicitly marked as 'dropped'.
  3. Clean up before the move: Merge duplicates and remove orphaned records that have no link to anything. Decide together with the business team which legacy data doesn't come along at all.
  4. Run a trial migration: At least one complete run with a copy of the real data in a test environment. Made-up test data won't surface the real edge cases.
  5. Reconcile: Compare record counts per table and calculate totals, for example across all open invoice amounts. Spot checks are done by the people who work with the data every day.
  6. Set the cutover date and a way back: On cutover day the legacy system becomes read-only. There is a documented rollback plan, and the legacy system is not deleted.

Point 3 is the one people skip most often. Before the move, cleanup takes hours. After the move it takes weeks, because by then the errors have spread across the entire new system.

Illustration for the question "Data migration checklist: what has to be settled before the move?"
AI-generated image

What does a data migration mapping table look like?

The mapping table is the most important document in a migration. For every source field, it defines where the field goes in the target and what happens to the value along the way. The migration script later just carries out these rules. If a rule is missing, whatever the import tool happens to do decides instead. The rows below come from a typical customer master file in an older ERP or inventory system. The field names are examples.

Excerpt from a mapping table, example for a customer master file
Source field (legacy system)Target field (new system)Transformation ruleRequired
KDNRLegacy customer numberImport as text so leading zeros are kept. Used later as the reference for orders.yes
NAME1 and NAME2Company nameJoin with a single space; remove double spaces and trailing spaces.yes
PLZPostal codeImport as text. For German addresses, restore a lost leading zero until the postal code is back to its full length.yes
DATUM_ANL in DD.MM.YYYY formatCreated onConvert to YYYY-MM-DD. Write empty or invalid values to the error log; don't replace them with today's date.no
ZAHLART as a codePayment methodTranslate using a lookup table, for example code U to bank transfer. Unknown codes go to the error log.yes
BEMERKUNGNoteImport unchanged. Check beforehand whether the longest note fits into the target field.no
FAXdroppedNot migrated. The business team's decision is recorded with a date.–

Two rules save the most trouble during the trial run. First: no field is left without an entry; 'dropped' is a decision too. Second: value lists such as payment methods, countries or statuses get translated completely. A single unmapped status is enough to make part of your orders vanish from every view in the new system.

Why do data migrations fail in practice?

A migration rarely fails because of volume. Usually it's small formatting details that nobody notices at first glance in the export file. These six mistakes come up again and again:

  • Broken special characters: The legacy system exports in an older Windows code page, but the import expects Unicode, or the other way around. Suddenly 'Müller' turns into 'Müller'. That pattern appears when the two bytes Unicode uses to store the ü are read as two separate characters of the old code page. The cause is an encoding that wasn't specified at export.
  • Swapped dates: Day and month trade places because a tool assumes the US order, month before day. The tricky part is that the import reports no error as long as the day would also be a valid month. It only fails or produces nonsense on later days of the month. The international format year-month-day works well as an intermediate format, because it can't be misread in either direction.
  • Excel changes values: Leading zeros disappear, so German postal codes in Saxony and Thuringia, which start with a zero, lose a digit. Excel also calculates with only a limited number of significant digits and replaces the rest of very long numbers with zeros. Long customer or item numbers are useless after that. The fix: explicitly import such columns as text when opening the file, or don't open the file in Excel at all.
  • Broken relationships: The target system assigns new IDs, and orders lose their customer. You avoid this by carrying the old ID along in a field of its own.
  • Truncated text: The target field is shorter than the source field, and the import cuts the text without warning. You can check this in advance by finding the longest string per field in the export and comparing it with the field length in the target.
  • Free text with mixed content: The 'Note' field holds phone numbers, contact persons and payment terms all jumbled together. No script separates that reliably; a person has to decide here.

Almost all of these errors show up in the trial run, provided you reconcile the numbers afterward. Without a trial run, you only find out when a customer gets a wrong invoice.

How do you validate that a data migration is complete?

The statement 'There are fewer customers in the new system than in the old one' tells you nothing on its own. Fewer can be correct if duplicates were merged and old junk was deliberately excluded. That's why we calculate, before the import, which number has to come out in the target. The formula is: records from all sources, minus duplicates removed by merging, minus deliberately excluded records, equals the expected number in the target. Anything still missing after that has to be in the error log with a reason. A record that shows up neither in the target nor in the log is a bug in the script. The table shows the calculation for a customer master file from two sources. The letters stand for the values you fill in for your own project.

Reconciliation calculation for a customer master file from two sources
Check itemCalculation stepWhere the value comes from
Customers in the Excel listARow count in the export, excluding the header row
Customers in the ERP systemBQuery on the customer table
Total of both sourcesA + BCalculated from the two counts
Removed by mergingDMatched on customer number and postal code, unclear cases decided by sales. When two records become one, only one counts as removed.
Deliberately excludedERecords with no address and no order, list approved by the business team
Expected in targetA + B − D − ECalculated before the import and recorded in writing
Actually in targetZCount in the new system after the import
In the error logFEach entry with record number and reason, for example an unknown payment method code
ResultZ + F must equal the expected numberIf the total is lower, records were silently lost. If it's higher, the script created duplicates, usually because it repeated a run without recognizing records already migrated.

The count alone isn't enough, because it won't notice when content was migrated incorrectly. Two more checks cover that. The first is a total across a numeric field, such as open invoice amounts or ordered quantities across all order lines. That total has to be identical in source and target. The second is a spot check: employees who know the customers open a few selected records in both systems side by side. It's best to pick the edge cases on purpose, meaning customers with special characters, very long notes or lots of orders.

How does data migration cutover day work?

Nothing new gets tried on cutover day. You run the same script as in the last successful trial run, using the latest data. For a big bang, this is how we proceed:

  1. Define go/no-go criteria in writing beforehand: for example, that the reconciliation matches except for logged cases and that the total of open items is identical. Who makes the final call is also settled in advance.
  2. Set the legacy system to read-only as soon as the last transaction of the day is entered. Every employee knows ahead of time from when on they may no longer enter anything.
  3. Create a full backup of the legacy system and verify that it can be restored. A backup that has never been tested is not a way back.
  4. Pull the final export and run the unchanged migration script. A last-minute change to the script makes the trial run worthless.
  5. Review the error log and repeat the reconciliation: count, total and spot check.
  6. Decide: On go, the new system becomes the system of record and the old one stays in read-only mode. On no-go, the write protection is lifted and the legacy system keeps running on Monday. Nothing is lost, because nothing was changed in the legacy system.
  7. For the first few days afterward, have a designated contact person and a channel for reporting errors. Whatever turns up there gets fixed in the new system, not in the old one.

The no-go case sounds like failure. In reality, it's the reason steps 2 and 3 matter so much: only if the legacy system is unchanged and backed up does an aborted cutover cost you a one-week delay instead of data.

What happens to legacy data that has to be retained?

With tax-relevant data, you can't simply shut down the old system after the migration. For businesses in Germany, the German Fiscal Code (Abgabenordnung) sets retention periods for books, annual financial statements, accounting vouchers and business correspondence, and depending on the type of document they run for several years. The period doesn't start on the day of the migration but at the end of the calendar year in which the document was created. During an audit, the tax authorities may access electronically stored data. Under the GoBD, a guidance letter from the German Federal Ministry of Finance, the data must remain machine-readable and analyzable for the entire retention period. A PDF printout of a table usually isn't enough. In practice there are two options. Either the legacy system is kept in read-only mode, or the data is exported to an archive format that can still be analyzed. Which retention periods apply to your records and which option is sufficient in your case is something to settle with your tax advisor, not with your software developer. The GDPR comes into play as well. Under its storage limitation principle, personal data may not be kept longer than necessary. That makes the migration a good opportunity to check which contact data would otherwise move along without any purpose.

Illustration for the question "What happens to legacy data that has to be retained?"
AI-generated image

Data migration example: from Excel and a legacy program to a new CRM

A typical scenario from a mid-sized business, deliberately without a company name: a trading company keeps its customer master data in an Excel list. Orders live in an older ERP program, and call notes are scattered across Outlook. The goal is a custom back office with CRM, where contact, company and deal belong together. First, we merge the Excel list with the customer master file from the ERP system. It turns out that the same company is spelled differently in the two sources. Matching runs on customer number and postal code, and unclear matches go to sales as a list. Then come the orders. Every order keeps its old customer number as a reference, so the assignment stays correct even after new IDs are issued. We don't migrate the Outlook notes automatically. They have no structure, and a script would assign them to the wrong contacts. Instead, the important notes are transferred by hand and the rest stays in the mailbox. After the trial run, we compare the customer count, the order count and the total of open items. Only when all three values match is the cutover date set.

Is the built-in import enough, or do you need a migration script?

The built-in CSV import of an off-the-shelf program is enough under three conditions. There's only one source, the records don't reference each other (a plain contact list, for example), and the target system produces an error log during import. In that case a custom script is effort with nothing to show for it. With a few hundred records, entering them by hand is sometimes even faster than any automation. A script pays off when several sources have to be merged, when orders, line items and customers reference each other, or when the trial run has to be repeated several times. DigifyNow writes migration scripts so they can run any number of times without creating duplicates. If a record can't be migrated, it lands in a log with a reason instead of silently disappearing. At the end there's a report with the numbers from source and target. During planning, it should already be clear where the migration fits in the process of a software project: before acceptance, not after. For an MVP, that means the trial migration already runs against the development build and not only against the finished system, so gaps in the data model show up while the model can still change. A process analysis beforehand also helps. It shows which data is actually still needed in the new workflow.

Illustration for the question "Is the built-in import enough, or do you need a migration script?"
AI-generated image

How much does data migration cost, and when isn't it worth it?

There's no flat price for a data migration, because the effort depends on properties of the data that you only know after looking at the actual records. The number of gigabytes barely matters. These factors are what mainly drive the effort:

  • Number of sources: Every additional source brings its own field names, its own spellings and its own duplicates, all of which have to be matched against the others.
  • Access to the legacy system: If it offers a complete export or a database query, that's the easy case. If it only shows data on screen or stores it in a proprietary format, a way to get at the data has to be found first. Some vendors offer the export only as a separate paid service.
  • Data quality: Duplicates, mixed free text and inconsistent value lists mean manual work, specifically on the side of the business team that decides the unclear cases.
  • Relationships: A plain contact list is moved quickly. Customers with orders, line items and documents require every relationship to be preserved and checked.
  • Number of trial runs: Every run with reconciliation takes time. Cutting corners here just pushes the errors into live operations.
  • Archiving: Whether the legacy system keeps running in read-only mode, with its license and server, or an analyzable archive is built is a cost item of its own.

A full migration often isn't worth it for legacy data that hardly anyone looks at anymore, such as closed orders from many past years. In that case it's usually enough to move active customers and open transactions and leave the rest in a readable archive. At DigifyNow, a reliable figure only comes after an inventory with a sample export from the legacy system. This free, no-obligation assessment is also the first step if the migration is meant to be part of new software. How migration, interfaces and operations affect a project as a whole is covered in our article on the cost drivers of software development.

Frequently asked questions

How long does a data migration take?

The duration depends on the number of sources, the data quality and the relationships, not on the data volume in gigabytes. For small and mid-sized businesses, the actual move often fits into a weekend, between Friday evening and Monday morning. The inventory, mapping, cleanup and trial runs beforehand take considerably longer. A firm date can only be given once the data has been inventoried.

Which file format is best for exporting data in a migration?

For flat tables, a CSV file with Unicode encoding and an unambiguous delimiter works well. For nested data such as orders with line items, JSON is a better fit because it represents the hierarchy. An Excel file is risky as an intermediate format, because Excel strips leading zeros and truncates very long numbers, which makes customer and item numbers useless.

Can the old system be deleted after the data migration?

With tax-relevant data, usually not right away. The German Fiscal Code sets multi-year retention periods depending on the document, starting only at the end of the year the document was created, and the GoBD require the data to remain machine-readable and analyzable. The usual approach is to keep the legacy system in read-only mode or export the data to an analyzable archive. Check with your tax advisor which period applies to you.

What is the difference between data migration and data integration?

A data migration transfers data once and ends with a cutover date, after which the new system is the system of record. A data integration connects two systems that both keep running and syncs data between them on an ongoing basis, for example via an API or webhooks. A phased migration involves both: for the transition period you need an integration, which is switched off again after the final stage.

Request a free assessment of your project