Portable Files: Using .QBM Files to Temporarily Shrink Your Database

Creating and immediately restoring a Portable Company File (.QBM) shrinks an oversized QuickBooks Desktop .QBW database without deleting a single transaction. When QuickBooks restores a .QBM, it exports only active accounting records and rebuilds every internal table and index from scratch—stripping out empty pockets and database fragments that accumulate over time. Keep in mind that this shrinkage is temporary: the .QBW file will slowly expand again as you record new daily activity.

Fast-Fix: The 45-Second Solution

Back up first, then create and restore a .QBM. Switch to Single-User Mode, run Verify Data, save a full .QBB backup, then go to File > Create Copy > Portable Company File. Immediately restore it via File > Open or Restore Company > Restore a portable file to rebuild a smaller, defragmented .QBW database.

Why a .QBM Shrinks Your Database—and Why It Is Temporary

Over months of creating, editing, and deleting invoices, bills, and audit trail entries, your .QBW file builds up internal empty space and scattered database indexes. Even if your business stops growing, that dead space keeps your .QBW file larger and slower than necessary.

  • What .QBM fixes: Exporting to a .QBM and restoring it drops dead space, compacts internal tables, and resets DB File Fragments cleanly without altering financial reports or deleting history.
  • What .QBM does NOT fix: It does not delete old transactions, reduce list item counts, or permanently stop file growth. As users save new transactions and audit entries, internal slack gradually returns—which is why .QBM compaction is a temporary maintenance reset rather than a permanent substitute for Condense Data or starting a new file.

For more on how fragments slow QuickBooks down in the first place, see Database Fragments: How to Audit and Fix Fragments That Slow You Down.

Critical Warnings Before You Restore a .QBM

A Portable Company File is not a complete backup. Before restoring a .QBM over or alongside your working company file, protect these items:

  1. Always create a full .QBB backup first: A .QBM omits custom invoice templates, logos, QuickBooks Letters, Spelling Dictionaries, Fixed Asset Manager data, your .TLG transaction log, and your Document Center attachments (Attach folder). If you carelessly replace your entire working folder without a .QBB backup, you can lose those extras. Learn the exact differences in Restore Guide: The Difference Between Restoring .QBB and .QBW Files.
  2. Run Verify Data before creating the .QBM: A .QBM built from a damaged .QBW file will often fail during restore.
  3. Never overwrite your original .QBW blindly: Save the restored .QBW with a clear name or rename your original file (for example, adding _PRE_QBM) after verifying the restored numbers.

Step-by-Step: How to Shrink Your .QBW File with .QBM

Step 1: Record Your Baseline Size and Run Verify Data

  1. Open your company file, press F2 (or Ctrl + 1), and note your current File Size and DB File Fragments. See F2 Screen Secrets: Using the Product Information Screen for Diagnostics if you are unsure where to look.
  2. Have all other users sign out and switch to Single-User Mode (File > Switch to Single-user Mode).
  3. Run File > Utilities > Verify Data. If QuickBooks finds errors, run Rebuild Data before proceeding.
  4. Create a full local .QBB backup (File > Back Up Company > Create Local Backup) and store it safely.

Step 2: Create the Portable Company File (.QBM)

  1. Go to File > Create Copy.
  2. Select Portable company file and click Next.
  3. Save the .QBM file to a local folder (such as your Desktop) with an obvious name like Company_Compact.qbm.
  4. Wait for QuickBooks to finish compressing and verify the prompt confirming the .QBM was created.

Step 3: Restore the .QBM into a Clean .QBW

  1. Go to File > Open or Restore Company.
  2. Select Restore a portable file and click Next.
  3. Browse to your .QBM file on the Desktop and click Next.
  4. Choose where to save the newly rebuilt .QBW file—do not overwrite your only original .QBW yet. Either save it into a temporary test folder first, or rename the original .QBW in your working folder to Company_OLD.qbw and restore the .QBM under your standard filename so your existing Attach folder and templates remain in the same directory.
  5. Let the restore finish without interrupting it.

Step 4: Verify the Compacted File and Reset Your .TLG

  1. Open the restored .QBW file and press F2 to confirm your File Size and DB File Fragments dropped.
  2. Run File > Utilities > Verify Data and compare a Balance Sheet and Profit & Loss report against your pre-QBM numbers to confirm every balance matches.
  3. Check that custom invoice templates and attached documents open normally.
  4. Run one fresh local .QBB backup (Create Local Backup with Complete Verification) to generate a clean matching .TLG file—see .TLG File Fix: How to Truncate Transaction Logs to Boost Performance.

What If .QBM Fails to Restore or Barely Shrinks the File?

Final Safety Reminder

Keep your pre-QBM .QBB backup archived for at least a few weeks after switching to the compacted .QBW file. As long as you verify your financials right after the restore and never interrupt QuickBooks mid-write, using a .QBM is one of the safest maintenance resets available in QuickBooks Desktop.