You built your loss prevention system on Salesforce. That means you control the investigation logic, the case data, and the responsibility to protect and move your information when needed. Don’t let a vendor or integrator lock you out of your own loss prevention data. As a System Administrator you can export your org’s records and files any time. Below I’ll walk you through the safe, repeatable way to export data from Setup, show what the export looks like, warn about big files that can break exports, and give concrete SOQL queries you can paste into the Developer Console to find those large files so you can download them manually.

Quick overview: the native options

  • Data Export (Setup > Data Export) – the built-in, no-extra-tools export that zips CSVs for standard and custom objects and can include Files and Attachments. You can run an immediate export (Export Now) or schedule recurring exports. (Salesforce)
  • Developer Console / SOQL / Workbench / Data Loader – use these when you want targeted exports, to get lists of file IDs, or to pull binary file data programmatically. (More below.) (Salesforce)

Step-by-step: export your org from Setup (Data Export)

  1. In Salesforce, click the gear icon and select Setup.
  2. In Quick Find type Data Export and open Data Export (Data Management).
  3. Choose Export Now if available (or Schedule Export if you want weekly/monthly automated exports). Note: Export Now can only be used when enough time has passed since your last export. (Trailhead)
  4. Choose the encoding (UTF-8 is common), and check the boxes you want: for example Include Salesforce Files and Salesforce CRM Content document versions, Include Attachments, etc. (Salesforce)
  5. Click Start Export or Save for a scheduled job. You will get an email with download links when the export is ready.

What the Data Export looks like (typical contents)

When you unzip the export you will usually see:

  • A set of CSV files, one per object you selected (for example Account.csv, Contact.csv, Case.csv, MyCustomObject__c.csv).
  • A ContentVersion.csv or ContentDocument.csv metadata CSV and a sibling folder that contains the binary files for the ContentVersion export (often a ContentVersion folder with many files).
  • An Attachments folder if you included legacy Attachments, and CSVs listing Attachment metadata.
  • Relationship CSVs such as ContentDocumentLink.csv so you can see which files are attached to which records.

That means you get both:

  • CSV metadata you can import or query against later, and
  • The actual file binaries for Files or Attachments (when you checked the include option).

Important caution about very large files

Native Data Export is robust but it is not magic. If your org contains extremely large files or an enormous number of files, the export can be incomplete, fail, or produce archives so large they are impractical to download. If you think you have very large files (for example files larger than 1 GB) export those large files manually first and then run the standard Data Export for the rest. Salesforce support articles note that very large exports and very large numbers of files can cause problems and may require opening a support case. (Salesforce)

Practical rule of thumb:

  • Treat files > 1,073,741,824 bytes (1 GB) as “special” and plan to download them individually (or with a scripted API approach) before running the bulk Data Export.

How to find large files with SOQL in the Developer Console (exact queries you can use)

Use these queries to find candidate large files. 1 GB = 1,073,741,824 bytes (use that value in the query).

A. Files stored as Salesforce Files (ContentVersion)

SELECT Id, Title, ContentDocumentId, FileExtension, ContentSize, CreatedById, CreatedDate
FROM ContentVersion
WHERE ContentSize > 1073741824
ORDER BY ContentSize DESC
  • ContentSize is the ContentVersion field that holds the file size in bytes. Use this to locate very large files. (Salesforce Developers)

B. Legacy Attachments

SELECT Id, Name, ParentId, BodyLength, ContentType, CreatedDate
FROM Attachment
WHERE BodyLength > 1073741824
ORDER BY BodyLength DESC
  • BodyLength is the Attachment field that holds size in bytes. Note: many orgs use Files (ContentVersion) instead of Attachments, but run this query if your org still has classic Attachments. (Salesforce Developers)

C. How to find which records each file is attached to

  1. Run the ContentVersion query, copy the ContentDocumentId values you need.
  2. Then query ContentDocumentLink to discover the linked records:
SELECT Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility
FROM ContentDocumentLink
WHERE ContentDocumentId IN ('069xxxxxxxxxxxx','069yyyyyyyyyyyy')
  • Note: depending on your permissions you may need the Query All Files or View All Data type permissions to see every file and link. (Salesforce)

How to run those queries in the Developer Console

  1. Click the gear icon and open Developer Console. (Salesforce)
  2. Open the Query Editor tab at the bottom. Paste one of the SOQL queries above.
  3. Click Execute. The results appear in a grid.
  4. Developer Console does not always provide a slick CSV download for large result sets. For exporting query results to CSV consider one of these options:
    • Use Workbench (workbench.developerforce.com) to run the query and download CSV.
    • Use Data Loader or dataloader.io to export the object.
    • Use the Salesforce Inspector browser extension to run the query and export results.
    • Or copy the Developer Console grid and paste into a sheet for small result sets. (Stack Overflow)

If you find very large files – how to download them safely

Manual UI download

  • From the record page, open the Files related list, click a file and choose Download. This is OK for a few files.

Programmatic download (REST API)

  • Use the ContentVersion record Id and the VersionData endpoint to fetch the binary. Example curl (replace placeholders):
curl --header "Authorization: Bearer <SESSION_ID>" \
https://<instance>.salesforce.com/services/data/v60.0/sobjects/ContentVersion/068xxxxxxxxxxxx/VersionData \
  -o my-large-file.pdf
  • That endpoint returns the binary for the ContentVersion record. Use an authenticated session token or OAuth flow.

Notes about Data Loader and bulk exports of binary fields

  • Data Loader will export metadata rows for ContentVersion but may not handle large binary blobs (VersionData) the way you expect. Some tools will export only CSV rows and leave the binary out, or will fail when queries select blob fields. If you need to bulk-download many files, a script that iterates ContentVersion Ids and downloads VersionData via the REST API is commonly used. Also consider third-party backup/export apps on AppExchange if you need full, large-scale exports. (Salesforce)

Practical checklist before you run a full Data Export

  1. Run the SOQL queries above to find files > 1 GB. Download those files individually via the UI or REST API.
  2. Ensure you have the right permissions (System Administrator, View All Data, and if needed Query All Files).
  3. Decide whether you need Export Now or a scheduled recurring export. Use Export Now only if allowed at that time.
  4. After the export completes, download the zip and verify that key CSVs exist (objects you need and ContentVersion/ContentDocumentLink if you expected files). If a CSV is missing or corrupted, open a support case with Salesforce; very large exports sometimes require support assistance.

Final thoughts – control and portability

You and your company pay for the system, you own the business outcomes, and you must own the data. Build a habit:

  • Schedule regular exports, keep at least one copy off-platform, and test restores and re-imports occasionally.
  • If a vendor provides a managed Salesforce product, insist on clear data portability in the contract and a documented export process. Don’t let integrations or vendors make data extraction expensive or impossible.

AdmiralBridge chose to build on Salesforce so that you have clear and unobstructed access to your data. If you are using a Salesforce product today and you need support for this process, contact us and we would be happy to walk through this with you.