To import data safely into a system customers already use, protect what is already there before you add anything. Back the system up, rehearse the import with a dry run that cannot write, check the whole file before any of it goes in, and write it in one step that either finishes or changes nothing. The rule that matters most is the one the import guides I read leave out: never let an import give an id that is already in use to a different record, because orders, saved lists and links follow the id, not the name.
I build data systems for small businesses at Pioneer AI & Data, and loading a business's own lists into the systems it already runs is part of the AI and data work. The worked example in this post is a load from October 27, 2026, when 624 college softball programs went into the live database of Pioneer Pennant Process, my college softball recruiting app. On November 6, 2026, a read-only check found that all 978 schools that were in the database before the load still had the same id, the same name and the same federal college id.
The pages that rank for this question are mostly import help pages and database tutorials. They say to back up, test on a sample, clean the file, match rows on a unique column and choose an import mode, which is all good advice. The ones I read do not say what to do when an id in the file already belongs to a different record.
What breaks when you import data into a live system
When you import data into a live system, the new rows are rarely the problem; the risk is to the records that already exist and to everything that points at them. An id is the number or code a system uses to tell one record from another: a product's SKU, a customer number, an order number, or a page's web address. An order line points at a product id, and an invoice at a customer id. A link in last spring's newsletter points at a web address.
If an import hands an id that is already in use to a different record, everything that pointed at the old record now points at the new one, and nothing reports an error. A database's own health check will not catch it. SQLite, the database engine under Pioneer Pennant Process, documents that its integrity check "does a low-level formatting and consistency check of the database" and that it "does not find FOREIGN KEY errors." Even a check of the links between tables would pass, because every reference still points at a record that exists. A check that asks whether the database is damaged cannot tell you whether id 9,000,123 still means the same college it meant yesterday.
A web address is an id too. Tim Berners-Lee made the point in 1998 in "Cool URIs don't change": "When you change a URI on your server, you can never completely tell who will have links to the old URI." Google's guide to site moves with URL changes says to keep redirects from old addresses "for as long as possible, generally at least 1 year." An import that renames products and rewrites their web addresses breaks every link that pointed at the old ones, unless the old addresses are redirected.
Eight rules for importing data safely
Importing data safely comes down to eight rules, and most of them are settled before the first row is written.
- Back up right before the import, with the system's own backup tool. Copying a database file by hand can produce a broken copy. SQLite's documentation warns that if a power or operating system failure "occurs while copying the database file the backup database may be corrupted," and its online backup tool exists to address that. A backup counts only if it opens, which is what testing your backups checks.
- Rehearse with a dry run that cannot write. A dry run is a rehearsal that reports what an import would change without changing anything. Make the rehearsal physically unable to write by opening the database read-only, which SQLite allows with a single
mode=rosetting. The dry run should report how many rows are new, how many match records already there, and which records already there are missing from the file. - Check the whole file before writing any of it. Every id present and unique, no name used twice, every required field filled, every code one the system knows. One bad line stops the import with nothing changed.
- Give new records ids that cannot collide with old ones. Hand out new ids from a reserved range far from the existing ones, once each, and never reuse one.
- Never point an id that is in use at a different record. Decide in writing what makes a record the same record. A product renamed is still the same product; a different product on the same SKU is not. Stop the import when an id would move to a different record.
- Write everything in one all-or-nothing step. A transaction is a group of changes a database treats as one, and SQLite's documentation defines atomic commit as "either all database changes within a single transaction occur or none of them occur." Take the write lock at the start, so nothing else can write halfway through. Keep slow work outside the lock, and run the import when nothing else is writing.
- Touch only the fields the import owns, and treat a missing row as "leave it alone." A blank cell in the file should not erase a value someone typed by hand, and a record that is missing from the file should not be deleted.
- Have someone who did not build the import review it before it runs. The method I use for bigger reviews, several reviewers each working alone, is in how to review your website with AI. The load in this post had one reviewer, who also checked the fixes.
What a store or CRM import screen decides for you
A store or CRM import screen decides several of these rules for you, such as what a blank cell does and whether an import can be stopped, and its help page is where you find out what it decided. One large store platform's own product-import help page is plain about it. "Product imports started with a CSV file can't be canceled once they begin, and you can't view a history of past imports," it says, pointing to the store's activity log instead, and it tells the reader: "Before you start your import, make sure that you have a backup of your product data."
That store platform's help page also says that, with its overwrite option on, a blank cell is not a skip: "If a non-required column in the import CSV file is blank, then the matching value in the product list is overwritten as blank." The page also warns that a file "sorted by a spreadsheet editor such as Microsoft Excel or Apple Numbers might cause your products to be removed from their relevant image links on the CSV, and your product's images will be lost."
Five questions cover most of what an import screen decides for you, and the tool's help page is the place to look for each answer:
- Which column decides that a row matches a record already in the system? The system's own id or SKU is safer than a name, as long as you also check that each id still means the same record.
- What does a blank cell do? If a blank cell overwrites, delete the columns you do not mean to change before you import, but keep any column the ones you change depend on.
- What happens to records that are not in the file? They should be left alone.
- Can the import be undone, or at least seen afterward? If the answer is no, the backup is your undo.
- Will any web address change? If one does, redirect the old address to the new one for as long as you can, and at least a year.
A worked example: 624 programs added to a live database
On October 27, 2026, at 8:09 AM Eastern, 624 NAIA and junior college softball programs went into the live database of Pioneer Pennant Process, which took the list from 978 colleges, all NCAA, to 1,602. The new programs were 186 schools in the NAIA, a college athletics association separate from the NCAA, and 438 junior colleges in three associations: the national NJCAA, the CCCAA in California and the NWAC in the Northwest.

The ids were the one thing the load could not get wrong. In Process, a family's Top Ten list and recruiting log, a team's logged events and contacts, and an AI app's remembered school all name a school by its id. The loader's own comment says what happens if one of those ids moves: it "moves all of them to another school, silently." So the 624 new programs got ids from a reserved range, 9,000,001 to 9,000,624, far above the NCAA's own numbers, and the rebuild script stops if an NCAA id ever reaches that range. The ids were frozen the day families could first save these schools.
Here is how the load met each rule:
| Rule | How the October 27 load did it |
|---|---|
| Back up first | A copy made with SQLite's backup tool at 8:08:59 AM, right before the write |
| Dry run that cannot write | Opened the database read-only; reported new rows, existing rows, rows with no federal college id, and rows in the database but not the file; ran clean |
| Check the whole file | Exact columns, ids unique and in the reserved range, names unique, known divisions, two-letter state codes; any failure printed "Nothing changed" |
| Ids that cannot collide | 9,000,001 to 9,000,624, handed out once and never reused |
| Never re-point an id | A record is the same program when its federal college id and its group match (the name stands in for the five with no federal id), so a renamed college passes and a different college on the same id is stopped; a federal id an NCAA school already holds is stopped too |
| One all-or-nothing write | One transaction that takes the write lock at the start, with the slow read of the federal file of majors done before the lock; any error rolls the whole load back |
| Touch only what it owns | The file owns names, divisions, conferences, towns, states, federal ids and links; coaches, camps and logos belong to the programs that read colleges' websites, and to people, and are never touched; the loader leaves a program missing from the file alone; the load also filled a new open-admission field for every school with federal facts |
| Separate review | A separate AI agent with read-only access, before the ship (next section) |
The load ran its dry run first, clean, then wrote all 624 programs in one step. SQLite's integrity check came back ok, 162 tests for this change passed against the real database just before the deploy, and the deploy's own checks passed. At 8:10 AM, checked from outside the server with requests that skipped any saved copy, the new division pages, school pages, the finder, the map and the sitemap all answered, and the home page counted 1,602. The map pinned 1,593 schools; the 9 without a pin have no federal location on file, such as colleges in Canada.
The load left gaps empty rather than guess at them. Five of the 624 programs have no federal college id of their own, and three Illinois colleges have an id the federal College Scorecard does not list, so those pages show no academic facts yet instead of another school's.
The next morning's load followed the same pattern. On October 28, a second load added 412 athletics web addresses to the same programs, again after a backup and a dry run. Coach, camp and staff details read from colleges' websites went in only where the live database had nothing, and the 928 NCAA head coaches already on file were unchanged.
On November 6, 2026, I opened the backup from 8:08:59 AM and today's database side by side, both read-only. The backup holds 978 schools and none in the reserved range. Today's database holds 1,602, with the 624 new ones from 9,000,001 to 9,000,624. All 978 earlier ids are still there, each with the same name and the same federal college id.
What the independent review caught before the load shipped
The independent review of the whole change, the loader and the rebuild plus the pages and tools that show the new schools, found ten problems. Two were serious, both in how the data gets loaded, and the review's check of the fixes found one more serious one; all three were fixed before anything shipped. The reviewer was a separate AI agent with read-only access to the code, working the evening before the load.

- A bad line could empty the database during a rebuild. The rebuild script, which builds the whole database from its source files, deleted the old database before it built the new one. With the new list file added to the rebuild, a bad line in that file would have stopped it partway with nothing left behind. The rebuild now builds into a separate file and moves it into place only when it is whole.
- A later load could move a saved school's id to a different college. In the work copy, renumbering the list file re-pointed 439 ids at once, the review found. The loader now stops when an id in use would point at a different program, and overriding it takes a separate setting meant for someone who has decided what the saved references should do.
- A rebuild skipped the id guard. The check of the fixes found that a rebuild starts from an empty database, so the loader's guard had nothing to compare against. The rebuild now checks the list file against the ids the live database already gave out, before it builds anything.
The review's other findings included a dry run that could write; the dry run now opens the database read-only and will not create one that is missing. Each of the review's fixes has a test, and the test names read like the rules: "an id in use never moves to another program" and "a rebuild will not renumber the ids families use." The work copy passed 1,359 tests before the ship.
How to import your own product or customer list safely
To import your own product or customer list safely, start from an export of the system you are loading into, because the export carries the system's own ids. Keep the id or SKU column in the file and match on it, never on the name. Remove the columns you do not mean to change, keeping any that the changed ones depend on, and do not re-sort the file in a spreadsheet unless you know the import tool tolerates it.
Try the file on a test copy or a handful of rows first, if the tool allows it, and read the result record by record. Make a fresh backup right before the real import, and check that the backup opens. Afterward, look up a few records you know by heart, by id, and open a few old links. If any web address changed, redirect the old one.
If someone builds an import for you, ask to see three things before it runs against your live system: the dry run's report, the name of the backup it made, and what stops an id from moving to a different record. Anyone who has built a safe import can show all three in a few minutes. The records your customers already rely on should come out of an import with the same ids, still meaning the same things.



