[SalesForce] export/import attachments using dataloader only

I am trying to simulate a backup and restore of a sandbox, before doing it in production. I need to export attachments from a source org to a target org. My problem is, when I export the Attachments, I get the files in binary format, but when importing, dataloader can't intrepret the file. I have to do it via dataloader, not via dataloader.io, because we are actually doing a backup using the standard schedule data export. And the files obtained are csv files. Has anyone been able to achieve this via dataloader only?

Best Answer

Not 100% sure I understand the question, but I have been able to take a weekly backup that includes attachments, and then load them into another org. If you include the attachments in the weekly backup, you also get a CSV for the attachments object that provides a link to those files. As long as the file path in the CSV matches where the files are and the parent ids exist in the system, they should load ok.

But - if you are doing a backup/restore, you'll need to link the old parent ids in the attachment csv to the new records you create as part of the restore I think? Also, I would reduce the batch size for the dataload to something like 5, because you quickly hit heap size limits.

Related Topic