I am trying to do an export of approx 30,000 attachments in our Salesforce Org,

Would anyone have been through a similar exercise and can advise best practice or the best way / tool to do this?

Kind Regards

matt
['https://salesforce.stackexchange.com/questions/206311', 'https://salesforce.stackexchange.com', 'https://salesforce.stackexchange.com/users/34616/']
The first thing I would try is the (relatively) new [SFDX](https://developer.salesforce.com/tools/sfdxcli) tooling. See the SFDX documentation [Example: Export and Import Data Between Orgs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data_example.htm).

The export would follow this pattern (example from the above link):

```
sfdx force:data:tree:export --query \
      "SELECT Id, Name, Title__c, Phone__c, Mobile_Phone__c, \
              Email__c, Picture__c, \
       (SELECT Name, Address__c, City__c, State__c, Zip__c, \
               Price__c, Title__c, Beds__c, Baths__c, Picture__c,  \
               Thumbnail__c, Description__c \
        FROM Properties__r) \
       FROM Broker__c" \
     --prefix export-demo --outputdir sfdx-out --plan

```

but with the SOQL querying the `Attachment` object.

(Not sure about governor limits: may be necessary to use many requests with a `where` clause to break the data up into groups.)
If you don’t want to perform a manual entry and save time, check out Data2CRM - an automated migration tool that can transfer your attachments.