How to export data from Salesforce: Data Export Service, Data Loader and reports
Salesforce offers three official ways out: the Data Export Service (a zip of CSV files, every object), Data Loader (a desktop app, one object at a time) and report exports. This guide shows when to use which, and how the files keep your records connected.
- Accounts
- Contacts
- Leads
- Opportunities
- Tasks and events
- Attachments
- Record IDs
Which method to use
- Data Export Service: everything at once, as a zip of CSV files, one per object. The best choice for a move.
- Data Loader: one object at a time, with exactly the fields you choose. Useful for very large objects or a quick re-export.
- Report export: a report as Excel or CSV. Fine for a list, not for a complete move.
Export everything with the Data Export Service
- Open Setup and type Data Export in Quick Find.
- Choose Export Now (or Schedule Export for a recurring backup).
- Choose the export file encoding. Pick UTF-8 if it is offered, so accents and special characters survive.
- Tick Include images, documents, and attachments and Include Salesforce Files and Salesforce CRM Content document versions if you want your files too. Leave them off for a faster export.
- Select Include all data, or tick the objects you need: Account, Contact, Lead, Opportunity, Task and Event at least.
- Start the export. Salesforce emails the user who started it when the files are ready.
- Download every zip within 48 hours. Files are deleted after that, and as soon as a new export is queued.
How the files keep records connected
Each CSV has an Id column, and related records refer to it. A contact's AccountId and an opportunity's AccountId are the Id of their account. On tasks and events, WhoId points to a person (a lead or a contact) and WhatId to a record such as an account or an opportunity. Keep these columns: they are what connects your records in the new tool.
Export one object with Data Loader
- Install Data Loader (Windows or macOS; it needs Java 17 or later) and make sure you have API Enabled and read access to the records.
- Click Export, or Export All to include archived activities and deleted records.
- Log in and choose the object. Use Show all objects if it is not listed.
- Choose where to save the CSV. An existing file with the same name is overwritten.
- Choose the fields. Add related fields such as Account.Name if you want the account name next to its Id.
- Click Finish, then Yes.
In Data Loader's settings, turn on Write all CSVs with UTF-8 encoding. Data Loader does not export attachments; use the Data Export Service for those. Data Loader is available on Enterprise, Performance, Unlimited and Developer editions.
What the exports leave out
- Formula and roll-up summary fields are never in a data export. Recreate them in the new tool.
- Recycle Bin records are not in the Data Export Service files (archived records are).
- Report exports cut long text to 255 characters in Formatted exports, and are limited in rows; use Details Only as CSV, or a data export, for complete text.
Troubleshooting
- Too many requests (HTTP 429) while downloading: download one zip at a time and wait a minute between downloads.
- A scheduled export did not run: an export whose start time falls on a daylight saving change is skipped; move the start time. An export also fails when the user who scheduled it is deactivated or loses the permission.
- Compound fields fail in Data Loader: select the parts of an address (street, city, postal code) instead of the address field.
Sources
Salesforce changes its product. These are the pages this guide follows; when in doubt, they are the authority.
