How do you migrate Salesforce attachments to external storage?

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.

What happens to your Salesforce data when you migrate attachments?

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.

What are the main options for Salesforce external storage?

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.

  • Amazon S3: Highly scalable, cost-efficient object storage that integrates well with Salesforce through native connectors or third-party apps. Ideal for large document volumes.
  • SharePoint / OneDrive: A natural fit for organizations already using Microsoft 365, enabling real-time collaboration alongside document storage.
  • Google Drive: Works well for teams in the Google Workspace ecosystem, with shared folder structures that mirror Salesforce record hierarchies.
  • On-premises servers: Used in regulated industries where data residency requirements prevent cloud storage. Requires more infrastructure management.

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.

What’s the difference between Salesforce Files and Salesforce Attachments?

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.

Hi, how are you doing?
Can I ask you something?
Hi! I see you're exploring how to migrate Salesforce attachments to external storage. Many Operations and Project Managers in document-intensive teams face exactly this challenge. Which best describes your current situation?
That makes sense — you're not alone. Teams across real estate, media, retail, and more run into the same wall. To point you in the right direction, which of these best fits what you're looking for?
Great — based on what you've shared, it sounds like Cartularius could be a strong fit. It's built specifically for Salesforce teams dealing with storage limits and document workflow challenges, with native Amazon S3 integration and automated file organization — all without leaving Salesforce. I'd love to connect you with our team so they can walk you through how it maps to your situation. Drop your details below and someone will be in touch!
You're all set! 🎉 Our team has received your information and will review your request. Someone will reach out to discuss your Salesforce document storage situation and explore the right solution for your team. Thanks for your interest in Cartularius!
In the meantime, feel free to explore our features and pricing at cartularius.com.

How do you actually move attachments out of Salesforce?

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:

  1. Audit your attachments: Run a report or SOQL query to understand the volume, file types, and parent record distribution of your existing attachments.
  2. Choose your external destination: Confirm where files will live after migration and set up the storage environment in advance.
  3. Export attachment data: Use the Salesforce API, Data Loader, or a migration tool to pull attachment records including their binary Body field.
  4. Upload to external storage: Transfer files to your chosen platform, preserving folder structure and naming conventions that reflect Salesforce record relationships.
  5. Update Salesforce records: Replace deleted attachment records with external file links or create ContentDocument records pointing to the new locations.
  6. Validate and test: Confirm that users can access files from Salesforce records and that no links are broken before decommissioning the original attachments.

What tools are used to migrate Salesforce attachments?

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.

How do you avoid hitting Salesforce storage limits after migration?

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.

Should you use a Salesforce-native document management app instead of manual migration?

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.

How Cartularius helps with Salesforce attachment migration and storage

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:

  • Amazon S3 integration: Offload files from Salesforce storage directly to your own S3 environment, giving you virtually unlimited capacity without paying for expensive Salesforce file storage overages.
  • Cost-efficient scaling: Storing files in S3 through Cartularius is significantly more cost-effective than expanding your Salesforce storage allocation, especially as your document repository grows into the tens of thousands of records.
  • Automated organization: Files are automatically categorized and linked to the correct Salesforce records, eliminating the manual effort of maintaining folder structures after migration.
  • Performance and backup: Large file uploads and downloads are handled efficiently through Amazon’s infrastructure, with built-in redundancy to protect your documents.
  • Native Salesforce experience: Your team accesses, shares, and manages documents without leaving Salesforce, which means no additional training and immediate adoption.

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.

Related Articles

Table Of Contents

Share this post

Enjoy a 30-day trial and transform your workflow today

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.

Discover the power of Cartularius in a personalized demo. Our experts will showcase live examples tailored to your business. Get your questions answered and see how our solution streamlines collaboration and accelerates processes. Schedule your demo today and unlock smarter document management.

Get the list

Please provide us with your Name, Job Title and Email Address and you will receive the complete predefined list of Document Categories and Document Types in your inbox.

Get Quote (Enterprises)

Please provide us with as much relevant detail on your needs as possible at this stage in the form below. We understand your business is unique and we would very much like to get you the best offer possible. Thank you!

Get Quote (Non-Profit)

Please provide us with as much relevant detail on your needs as possible at this stage in the form below. We understand your business is unique and we would very much like to get you the best offer possible. Thank you!