Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Last time I checked, there was no way to access the backup file status (or actual files) over the API. I suspect they have made this process difficult to automate by design. </p> <p>I use the Salesforce scheduler to prepare the files on a weekly basis, then I have a scheduled task that runs on a local server which downloads the files. Assuming you have the ability to automate/script some web requests, here are some steps you can use to download the files:</p> <ol> <li>Get an active salesforce session ID/token <ul> <li>enterprise API - login() SOAP method</li> </ul></li> <li>Get your organization ID ("org ID") <ul> <li>Setup > Company Profile > Company Information OR </li> <li>use the enterprise API getUserInfo() SOAP call to retrieve your org ID</li> </ul></li> <li>Send an HTTP GET request to https://{your sf.com instance}.salesforce.com/ui/setup/export/DataExportPage/d?setupid=DataManagementExport <ul> <li>Set the request cookie as follows: <ul> <li>oid={your org ID}; sid={your session ID};</li> </ul></li> </ul></li> <li>Parse the resulting HTML for instances of <code>&lt;a href="/servlet/servlet.OrgExport?fileName=</code> <ul> <li>(The filename begins after fileName=) </li> </ul></li> <li>Plug the file names into this URL to download (and save): <ul> <li>https://{your sf.com instance}.salesforce.com/servlet/servlet.OrgExport?fileName={filename}</li> <li>Use the same cookie as in step 3 when downloading the files</li> </ul></li> </ol> <p>This is by no means a best practice, but it gets the job done. It should go without saying that if they change the layout of the page in question, this probably won't work any more. Hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload