To migrate Salesforce attachments to external storage, you export attachment records and their associated binary files using Salesforce’s data export tools or a third-party migration utility, then upload those files to your chosen external destination, such as Amazon S3 or SharePoint, and update the related Salesforce records to point to the new file locations. The process requires careful planning to preserve record associations and avoid data loss. The sections below walk through every key question you need to answer before, during, and after a Salesforce attachment migration.
When you migrate Salesforce attachments to external storage, the attachment records in Salesforce are either deleted or replaced with links pointing to the external file location. The underlying CRM data, such as account and contact records, remains untouched. What changes is where the file itself lives and how Salesforce references it.
This distinction matters because Salesforce attachments are stored as binary blobs in the database, consuming your paid file storage quota. After migration, those blobs are removed from Salesforce and hosted externally, which frees up storage but also means your team needs a reliable way to access files through the external system. If the link between the Salesforce record and the external file is broken during migration, users lose access to those documents entirely, so maintaining referential integrity is the most critical part of the process.
The main external storage options for Salesforce files are Amazon S3, SharePoint, Google Drive, and on-premises file servers connected via middleware. Each option involves moving files out of Salesforce’s native storage and accessing them through an integration layer that keeps files linked to their parent records.
Your choice depends on your existing technology stack, compliance requirements, and the volume of files you handle. For most document-intensive teams, a cloud-based option like S3 offers the best balance of cost, scalability, and performance.
Salesforce Files and Salesforce Attachments are two separate file storage systems within Salesforce. Attachments are the older, legacy format tied directly to a single parent record, while Salesforce Files (also called ContentDocument records) are the modern format that supports sharing across multiple records, versioning, and richer metadata.
Salesforce officially deprecated the Attachments object in favor of Files, and new Salesforce orgs no longer support Attachments by default. However, many organizations that have been using Salesforce for years still hold large volumes of legacy attachment data that was never converted. When planning a Salesforce document migration, you need to identify which format your files are stored in, because the export process and the tools you use differ between the two. Attachments are accessed via the Attachment object in the API, while Files are accessed through ContentDocument and ContentVersion objects.
To move attachments out of Salesforce, you query the Attachment object to retrieve file metadata and binary content, export the files to a staging environment, upload them to your external storage destination, and then create or update file reference records in Salesforce to maintain the link between each record and its documents.
At a high level, the steps look like this:
The most commonly used tools for Salesforce attachment migration are Salesforce Data Loader, the Bulk API, custom Apex scripts, and dedicated third-party document management tools built for Salesforce. The right tool depends on your technical resources and the complexity of your migration.
Salesforce Data Loader handles straightforward exports of attachment metadata and can work for smaller migrations, but it struggles with large binary files and does not natively handle the upload to external storage. The Bulk API is better suited to high-volume scenarios but requires developer involvement. Custom Apex or Python scripts give you the most control over the process, including file renaming, folder mapping, and error handling, but they demand significant development time. For teams without dedicated technical resources, a native Salesforce app that manages the migration and the ongoing file lifecycle in one place is often the more practical route.
To avoid hitting Salesforce storage limits after migration, you need to establish a governance policy that routes new files directly to external storage rather than allowing them to accumulate in Salesforce again. Migration alone solves the immediate storage problem; it does not prevent the same issue from recurring.
Practical measures include setting up automated rules that direct file uploads to your external storage platform at the point of creation, converting any remaining legacy attachments to Salesforce Files before they are migrated, and monitoring your Salesforce file storage usage on a regular schedule. You should also define retention policies that archive or delete files that have passed their useful life, rather than letting storage grow indefinitely. For teams managing large document volumes, connecting Salesforce to a scalable storage layer like Amazon S3 removes the ceiling on how much you can store without incurring escalating Salesforce storage costs.
For most teams, a Salesforce-native document management app is a better long-term solution than a one-time manual migration. Manual migration solves the immediate storage problem but leaves the underlying document workflow unmanaged, which means files will accumulate again and retrieval will remain inefficient. A native app addresses both storage and workflow in a single, sustained solution.
Manual migration makes sense if you have a one-time cleanup project, strong technical resources in-house, and a simple file structure. But for operational teams handling ongoing document volumes, such as contracts in real estate, media assets, or transactional records in retail, a purpose-built app provides automation, access controls, and search capabilities that a migration script cannot replicate. The Document Value Management model is one framework that helps teams think beyond storage and treat documents as structured, retrievable assets rather than files that simply need to be moved.
We built Cartularius specifically to solve the document storage and workflow challenges that Salesforce teams face after a migration and during day-to-day operations. Rather than treating file storage as an afterthought, Cartularius gives your team a structured, scalable document layer built directly inside Salesforce.
Here is what Cartularius brings to your Salesforce document migration and storage strategy:
If your team is dealing with Salesforce storage limits, scattered files, or an upcoming migration project, Cartularius is the practical next step. Explore our pricing options and see how we can help you build a document workflow that scales with your business.
Install Cartularius now and experience the best Salesforce document management solution and enjoy clean and structured data and optimized processes, risk-free for 30 days.