11

After a Data Export has completed there can be a large number of zip files to download.

If there are 80+ files at 130 MB (In Summer 12 the limit has been increased to 512 MB) each and each file takes several minutes to download it can be a time consuming process to do manually.

Is there a way to automate the retrieval of these zip files?

1

4 Answers 4

12

One approach is to use the SOAP API to automatically establish a session using securely stored credentials. Once the session is established you can use the Session ID and Server URL to send a web request to the page that contains the Data Export, parse out the download links, and then pull the zip files down and store them locally. Depending on the duration of the transfer you may need to recover from a lost session.

The usual caveat applies to this approach as some of the steps aren't using the provided APIs. Salesforce may at their whim break the ability to extract the zip paths.


Based on the above solution we have made a free tool using .NET here at work that can automatically download the Data Export from the command line and/or the included GUI app.

This can be useful when the number of zips to retrieve grows large or you want to automate the download process.

See FuseIT SFDC Data Export.


You might also like to vote for the idea: Weekly Data Export - Ability to automate file transfer via web service

2
  • should an answer to your question not primarly be more on how to technically do it ? (what api/processes to use) Part of your answer could be to mention existing tools/apps, but if an answer is limited to that, I would usually downvote it. Commented Aug 10, 2012 at 10:05
  • A fair point. I'll expand the answer with how it works. I'm vaguely aware of other possible solutions to this problem too and would be interested to see what others come up with. Commented Aug 10, 2012 at 10:13
4

I used a Firefox plug-in called DownThemAll: https://addons.mozilla.org/en-US/firefox/addon/downthemall/ It isn't quite as elegant, but it works.

4

I would like to add that I published an open source Python package to automate this process using selenium, this is lightning and classic compatible and easy to use in three lines of code. Give it a shot and let me know of any improvements.

You can install the package from Pipy:

pip install force-backup-automator

Then use the following to download your files:

from force-backup-automator import BackupController

backup_instance = BackupController(driver_location='./chromedriver',org_link='ORG MAIN URL',is_headless=0)

backup_instance.download_backups(download_location='TARGET LOCATION',backup_url='ORG URL/lightning/setup/DataManagementExport/home',user_name='USERNAME',password='PASSWORD')

I include here a link to the Pipy package: https://pypi.org/project/force-backup-automator/

Github Repo: https://github.com/stefanzepeda/force-backup-automator

And my blog website with the background and thinking of the package:

https://salesforceninjacom.wordpress.com/2021/01/20/automate-your-salesforce-data-exports-with-python-force-backup-automator/

The link above is to my blog site, it provides more extensive documentation.

2
  • Is there an example on how to implement this for a non-python user? Fuse IT doesn't work. Firefox down them all doesn't work anymore.
    – DCole
    Commented Mar 25, 2021 at 0:56
  • This no longer works due to unable to prefill the username and password. I think SF updated some of their security protocols.
    – DCole
    Commented May 3, 2021 at 23:19
0

The FuseIT SFDC Explorer mentioned in Daniel's original post is free and still works. But it is a manual process, file by file.

FuseIT has a paid tool that automates the whole thing, with scheduling and cloud options. Google Downloader.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .