Salesforce Files

Salesforce File Management: Storage, Limits, and Getting Files Back Out

Salesforce file storage is finite, chargeable, and surprisingly hard to audit, and most orgs discover this when a load fails rather than when they planned for it.

RASPSYS Admin9 min read

Short answer

Salesforce file storage is finite, chargeable, and surprisingly hard to audit, and most orgs discover this when a load fails rather than when they planned for it. This guide explains how Files, Attachments, and Documents differ, what consumes storage, how to find out what you are holding, and the options for bulk export and archival.

Files, Attachments, and Documents Are Not the Same

Salesforce has accumulated several ways of storing a file, and an org of any age usually contains all of them. Knowing which is which matters, because they behave differently, are reported differently, and are exported differently.

Mechanism What it is Status
Salesforce Files (ContentDocument) The modern mechanism: versioned, shareable across records, searchable Current; use this for anything new
Attachments The legacy mechanism: a file bound to a single parent record Legacy; still present in older orgs and created by some integrations
Documents An older library of files, often used for images in templates and email Legacy; largely superseded by Files and static resources
Notes (ContentNote) Rich-text notes stored as file content Current; counts against file storage
Notes (legacy) Plain-text notes on the old Note object Legacy; different object, different export path
Static resources Files used by code and components Current; counts against file storage

The practical consequence is that "export our files" is an ambiguous request. An org migrating away from Salesforce, responding to a subject access request, or simply archiving old material needs to deal with each of these separately, because a tool that handles ContentDocument will quietly miss everything stored as an Attachment.

For orgs still creating Attachments — usually via an old integration nobody has revisited — it is worth finding and changing the source. Attachments lack versioning and sharing, and every one created adds to a migration you will eventually have to do.

How Storage Allocation Actually Works

Salesforce separates data storage from file storage, and they are allocated and consumed differently. Data storage holds records; file storage holds file content. Running out of one does not affect the other, but running out of either causes immediate operational problems.

Allocation is typically a base amount per org plus an amount per user licence, varying by edition. Additional storage can be purchased. The important points are that the allocation is finite, that it is easy to consume faster than expected, and that Salesforce does not warn you in a way anyone notices until it is nearly gone.

  • File versions each consume storage. A document uploaded ten times as ten versions occupies ten times the space. This is the most common surprise in a storage audit.
  • Deleted files sit in the Recycle Bin. For fifteen days by default, still consuming allocation. Emptying it is part of any reclamation exercise.
  • Email attachments count. Orgs logging inbound email with attachments accumulate storage quickly and invisibly.
  • Integrations are frequent culprits. A process that attaches a generated PDF to every record will consume storage at a rate nobody modelled.
  • Records count too. Data storage is consumed per record at a fixed assumed size regardless of how few fields are populated.

What running out looks like

Not a warning email. It looks like a data load failing, an integration throwing errors, or users unable to attach a document — usually at the worst possible moment. Monitoring storage consumption as a trend, not as a point check, is the only way to see it coming.

Get help auditing and reclaiming storage →

Finding Out What You Are Actually Holding

The storage usage page in Setup shows totals and the largest consumers, which is a start but rarely enough to make decisions. Meaningful reclamation needs answers at a level the standard page does not provide.

Question Why it matters How to answer it
How much is held in old versions? Often a large share, and frequently safe to trim Query ContentVersion grouped by ContentDocumentId
What is the age distribution? Files untouched for years are archive candidates Query by created date and last viewed date
Which record types hold the most? Identifies the process generating the volume Query ContentDocumentLink by linked entity type
How much is duplicated? The same attachment on many records is common Group by file size and name, or compare content hashes
How much is in Attachments versus Files? Determines what export tooling you need Count both objects separately
What is in the Recycle Bin? Immediately reclaimable Check and empty, having confirmed nothing is needed

Run this audit before buying additional storage. In most orgs a meaningful proportion of file storage turns out to be old versions, duplicates, and files attached to records closed years ago — all of which can be archived externally at a fraction of the cost of extra allocation.

Bulk Export: The Options and Their Limits

Getting files out of Salesforce at volume is harder than getting them in. The built-in options each have constraints that become apparent at scale.

Method How it works Where it falls short
Data Export Service Scheduled weekly or monthly export including file content Scheduled rather than on demand; files arrive in a structure that needs mapping back to records
Data Loader Export ContentVersion records with content Awkward for file content; needs scripting to reassemble into usable files
REST or Bulk API Query metadata, then fetch each file individually Requires development; API limits constrain throughput
Third-party tools Purpose-built export with folder structure and naming Varies widely in whether Attachments and legacy Notes are covered
Manual download Users download what they need Not viable beyond a few dozen files
Backup and archival products Continuous backup including file content Appropriate for backup; often not designed for one-off bulk extraction

The recurring difficulty across all of these is reassembly. Salesforce stores file content separately from the record it relates to, so an export often yields a directory of files with system identifiers for names and no indication of which account, case, or opportunity each belonged to. For archival or audit purposes that is close to useless.

RASPSYS publishes SFDC File Exporter, a free Windows application built for this specific problem. It exports Files, Attachments, and Notes with original filenames and formats preserved, organised into a folder structure that reflects the records they were attached to — so the export is navigable rather than a flat directory of identifiers.

Building an Archival Strategy That Holds

Reclaiming storage once is housekeeping. Not having to do it again is a strategy, and it needs a small number of decisions made deliberately.

01

Define what belongs in Salesforce

Files a user needs while working a record. Everything else is a candidate for elsewhere.

02

Choose the archive destination

A document management system, cloud storage, or a file share — whatever your organisation already governs properly.

03

Set the trigger

Usually record closure plus a period, or last-viewed date beyond a threshold.

04

Preserve the link

A reference on the Salesforce record pointing to the archived location. An archive nobody can find is a deletion.

05

Respect retention

Archiving is not disposal. Retention obligations follow the file to its new home.

06

Automate and monitor

A manual annual clean-up will be skipped. Scheduled archival with a monthly storage trend report will not.

The link preservation step is the one most often skipped and the one that determines whether users accept the arrangement. If archiving means staff can no longer find a document they need, they will start storing copies elsewhere and the problem returns in a worse form.

Design a file archival strategy →

When You Will Need a Bulk Export

Bulk file export is one of those capabilities nobody thinks about until it is urgent. The situations below arrive with deadlines attached, which is a poor time to discover that your options are limited.

  • Leaving Salesforce. Whether consolidating onto another platform or changing supplier, the files have to come with you, and the contract end date is not negotiable.
  • Subject access or disclosure requests. A request may cover documents as well as records, usually with a statutory deadline.
  • Regulatory or legal production. A request for all documents relating to a matter, in a form someone else can read.
  • Storage reclamation. Archiving externally rather than buying additional allocation.
  • Org consolidation. Merging orgs after an acquisition means moving files as well as records.
  • Independent backup. Some organisations require a copy of business records outside the SaaS platform as a matter of policy.

It is worth testing your export route before you need it. Run an export of a representative subset, confirm the files are usable and attributable to their records, and confirm the process covers Attachments and legacy Notes as well as modern Files. Discovering a gap during a disclosure deadline is an avoidable problem.

Practices Worth Adopting Now

A handful of habits prevent most file management problems, and none of them require a project.

Practice Why Effort
Monitor storage as a trend Turns a surprise into a forecast A monthly report
Stop creating new Attachments Every one is future migration work Find and fix the integrations creating them
Limit version retention where appropriate Old versions are often the largest single consumer A policy plus periodic cleanup
Keep large binaries out Video and design files belong in a document system A guideline and a place to put them
Empty the Recycle Bin on a schedule Reclaims allocation immediately A scheduled task
Test your export route annually Confirms you can get data out before you need to An afternoon

The last row is the one most organisations have never done. The ability to retrieve your own business records from a SaaS platform is worth verifying while it is a test rather than an incident.

Frequently Asked Questions

What is the difference between Files, Attachments, and Documents in Salesforce?

Salesforce Files (ContentDocument) is the modern mechanism — versioned, shareable across multiple records, and searchable. Attachments are the legacy mechanism, binding a single file to one parent record with no versioning; they still exist in older orgs and some integrations still create them. Documents is an older library mostly used for template and email images. Notes exist in both a modern rich-text form stored as file content and a legacy plain-text form on a different object. This matters for export: a tool that handles ContentDocument will silently miss everything stored as an Attachment.

Why does our Salesforce file storage keep filling up?

Usually a combination of four things. Every version of a file consumes storage, so a document uploaded ten times occupies ten times the space — this is the most common surprise in an audit. Deleted files remain in the Recycle Bin consuming allocation for fifteen days. Logged inbound email with attachments accumulates quickly and invisibly. And integrations that attach a generated document to every record consume storage at a rate nobody modelled. Run an audit of versions, age distribution, and duplicates before buying additional allocation.

How do I export all files from Salesforce in bulk?

The built-in options are the Data Export Service, which runs on a weekly or monthly schedule, Data Loader exporting ContentVersion records, or custom development against the REST and Bulk APIs. The recurring difficulty with all of them is reassembly: Salesforce stores file content separately from the record it relates to, so exports often produce a flat directory of files named with system identifiers and no indication of which account or case they belonged to. RASPSYS publishes SFDC File Exporter, a free Windows application that exports Files, Attachments, and Notes with original names, formats, and a folder structure reflecting the parent records.

What happens when Salesforce storage runs out?

Not a prominent warning. It presents as a data load failing, an integration throwing errors, or users unable to attach a document — typically at an inconvenient moment. Data storage and file storage are allocated and consumed separately, so exhausting one does not affect the other, but either causes immediate operational problems. The only reliable way to see it coming is to monitor consumption as a trend over months rather than checking the storage page when something breaks.

When might we need a bulk file export?

Several situations arrive with deadlines attached: leaving or consolidating Salesforce orgs, where the contract end date is fixed; subject access or disclosure requests that cover documents as well as records; regulatory or legal production requests; reclaiming storage by archiving externally rather than buying allocation; and policies requiring an independent copy of business records outside the SaaS platform. It is worth testing your export route before you need it — run a representative subset, confirm the files are usable and attributable to their records, and confirm Attachments and legacy Notes are covered as well as modern Files.

Need to Export Files From Salesforce in Bulk?

SFDC File Exporter is a free Windows application from RASPSYS that bulk-exports Salesforce files, attachments, and notes with their original formats and folder structure preserved — useful for archival, migration, audit response, or simply reclaiming storage.