How-to · Salesforce Data Export
Does your export have every record?
Compare each object’s CSV data rows to a Salesforce COUNT() query. Use the same filters, and run the count close to the export snapshot. Matching counts mean the file has the same number of rows — not that every relationship is correct.
CSV data rows
12,481
Contact.csv
SELECT COUNT()
12,481
FROM Contact
CSV data rows
3,902
Account.csv
SELECT COUNT()
3,910
FROM Account
Example data. Not a real org or export. The second row shows what a gap looks like — the file has fewer records than the live count.
What this check tells you
Salesforce can export your org’s data as CSV files through weekly or monthly Data Export. A completeness check at the record-count level asks: for each object you exported, does the number of data rows in the CSV match the number of rows a COUNT() query returns in the org?
It does not prove that lookups, parents, or External IDs still line up. Row counts can match while relationships do not.
This is not the only way to check completeness. If you can install a tool and log into the org, free options already compare CSV row counts with Salesforce COUNT() (see below). Paid backup subscriptions are a different job — ongoing backup, not a one-off file check.
1. Get the export files
From Setup, enter Data Export in the Quick Find box, then select Data Export and Export Now or Schedule Export. Choose the objects you need (or Include all data). Salesforce creates a zip archive of CSV files and emails you when it is ready. Download files are available for 48 hours after completion.
Weekly export is available in Enterprise, Performance, and Unlimited Editions; monthly export is available in all editions except Database.com. You can run a manual export once every 7 days (weekly) or 29 days (monthly).
Recycle Bin data is not included in the exported data. Compare the file with a normal COUNT() of live records that match the same filters — not a count of deleted rows — so both sides exclude the Recycle Bin.
If your org uses person accounts and you export contacts, person account records are included in the contact data (with the fields shared by contacts and person accounts). Compare each file with the matching object: Contact.csv with COUNT() on Contact, Account.csv with COUNT() on Account.
Sources: Export Backup Data from Salesforce; Salesforce Data Export FAQ.
2. Count the data rows in each CSV
Salesforce documents CSV files this way: the first row lists the field names for the object; each subsequent row corresponds to a record. Data Export produces CSV files, so treat the first row as the header and do not count it as a record.
Practical count:
- Open the object’s CSV (for example
Contact.csvorAccount.csv). - Confirm row 1 is the header (field names such as Id, LastName, Email).
- Count the rows after that header. If the file has trailing blank lines, count rows that have an Id instead of counting every line.
In a spreadsheet, with the header in row 1 and Id in column A, a typical formula is =COUNTA(A2:A). That is ordinary spreadsheet counting, not a Salesforce formula.
If Data Export split one object across more than one CSV, add those files’ data rows together before you compare. (Whether a given org’s export splits an object is something you will see in the zip; do not assume a single file.)
Sources: Data Export produces CSV files — Export Backup Data from Salesforce. CSV header-and-record convention — Prepare a CSV File for an Import or Update in Salesforce and Prepare CSV Files (Bulk API 2.0).
3. Run COUNT() in the org
Salesforce SOQL’s COUNT() returns the number of rows that match the filtering conditions. It must be the only element in the SELECT list. You can use it with a LIMIT clause; you cannot use it with ORDER BY. COUNT() and COUNT(Id) are similar to SQL’s COUNT(*).
For a full-object Data Export (no extra report or Data Loader filter), use the object on its own:
SELECT COUNT() FROM Contact
SELECT COUNT() FROM Account
If the export was filtered, the query needs the same filter. Salesforce’s own example of a filtered count:
SELECT COUNT() FROM Account WHERE Name LIKE 'a%'
Run the query against the same org the file came from. In Salesforce Help, the Developer Console’s Query Editor (the Query tab) is the built-in place to execute SOQL. Open Developer Console from Lightning Experience via the quick-access menu, or from Salesforce Classic via your name and then Developer Console.
Use the same filters you used to produce the file, and run COUNT() as close as you can to the export snapshot. Data Export can be delayed by traffic, and records created or deleted after the export will change a later count.
Sources: COUNT() and COUNT(fieldName) (SOQL and SOSL Reference); Developer Console Query Editor; Open the Developer Console; export delay — Export Backup Data from Salesforce.
4. Compare, then know the limit
- If the CSV data-row count equals
COUNT(), the file has the same number of records as the query at that moment. - If the CSV is lower, the file is missing rows, or the org has gained rows since the export, or the query’s filter is wider than the file’s.
- If the CSV is higher, the query’s filter is tighter than the file, or you counted the header or extra blank lines.
Matching counts do not check blank Account lookups, wrong parents, or External ID drift. Those can be wrong even when both numbers agree.
Tools that already do the count check
If you can install software and log into the org, you do not have to count by hand:
BackupForce
A free, open-source desktop app. Its Backup Verification compares per-object CSV row counts with Salesforce COUNT() and gives a HIGH / MODERATE / LOW confidence report. It needs an install and an org login.
sfdump
A free command-line tool. sf inventory reports COMPLETE or INCOMPLETE across CSV objects, Attachments, ContentVersions, and indexes. It needs Python and org access.
Paid backup subscriptions — Salesforce Backup & Recover, Veeam, Odaseva, and others — are a different job. They are ongoing backup products, not a one-off check of a file you already exported.
Tool descriptions are from AIL Studio’s 10 November 2026 alternatives note, which summarized those vendor pages. Prices and extra features beyond what is stated here were not re-checked for this page and are omitted.
If you cannot install a tool or log into the org and want a files-only review of Contact and Account exports, see Salesforce Export Check on AIL Studio — a $19 one-time check, no org password.
AIL Studio is not affiliated with Salesforce. Salesforce is a trademark of Salesforce, Inc.