Skip to main content

Hi all,

 

I am new with Salesforce and i need to create a scheduled daily export of all our data.

I already found the "Weekly export service" in the web gui which looks like what i need.

 

But i need to automate this and export all data on a daily bases and export it to our

local fileshare server so we can include it in our backup cycle.

 

So i did find the Dataloader App and installed it on a Windows 10 Virtual machine.

The problem is that is need to find a way to be able export *all* data.

 

With the Dataloader i can create a batch file which will download data from a specific object.

 

This is an example i made:

 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

    <bean id="csvAccountExtractProcess" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">

      <description>csvAccountExtract job gets account info from salesforce and saves info into a CSV file."</description>

        <property name="name" value="csvAccountExtract"/>

        <property name="configOverrideMap">

            <map>

                <entry key="sfdc.debugMessages" value="false"/>

                <entry key="sfdc.debugMessagesFile" value="c:\dataloader_test\status\sfdcSoapTrace.log"/>

                <entry key="sfdc.endpoint" value="https://xxx.salesforce.com"/>

                <entry key="sfdc.username" value="user@domainname"/>

                <!-- password specified below is invalid, please generate one using the encrypt.bat utility -->

                <entry key="sfdc.password" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>

                <entry key="process.encryptionKeyFile" value="c:\dataloader_test\dataloader.key"/>

                <entry key="sfdc.timeoutSecs" value="600"/>

                <entry key="sfdc.loadBatchSize" value="200"/>

                <entry key="sfdc.entity" value="Account"/>

                <entry key="sfdc.extractionRequestSize" value="500"/>

                <entry key="sfdc.extractionSOQL" value="Select AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, BillingLatitude, BillingLongitude, BillingPostalCode, BillingState, BillingStreet, Company_email__c, CreatedById, CreatedDate, CurrencyIsoCode, DOZISF__ZoomInfo_First_Updated__c, DOZISF__ZoomInfo_Id__c, DOZISF__ZoomInfo_Last_Updated__c, DSCORGPKG__Conflict__c, DSCORGPKG__DO_3yr_Employees_Growth__c, DSCORGPKG__DO_3yr_Sales_Growth__c, DSCORGPKG__DeletedFromDiscoverOrg__c, DSCORGPKG__DiscoverOrg_Created_On__c, DSCORGPKG__DiscoverOrg_First_Update__c, DSCORGPKG__DiscoverOrg_FullCountryName__c, DSCORGPKG__DiscoverOrg_ID__c, DSCORGPKG__DiscoverOrg_LastUpdate__c, DSCORGPKG__DiscoverOrg_State_Full_Name__c, DSCORGPKG__DiscoverOrg_Technologies__c, DSCORGPKG__Exclude_Update__c, DSCORGPKG__External_DiscoverOrg_Id__c, DSCORGPKG__Fiscal_Year_End__c, DSCORGPKG__Fortune_Rank__c, DSCORGPKG__ITOrgChart__c, DSCORGPKG__IT_Budget__c, DSCORGPKG__IT_Employees__c, DSCORGPKG__Lead_Source__c, DSCORGPKG__Locked_By_User__c, DSCORGPKG__NAICS_Codes__c, DSCORGPKG__Ownership__c, DSCORGPKG__SIC_Codes__c, Description, Fax, Geolocation__Latitude__s, Geolocation__Longitude__s, Geolocation__c, Id, Industry, IsDeleted, Jigsaw, JigsawCompanyId, LastActivityDate, LastModifiedById, LastModifiedDate, LastReferencedDate, LastViewedDate, LinkedIn_Profile_Account__c, MasterRecordId, Metro_Area__c, Name, NumberOfEmployees, OwnerId, Ownership, ParentId, Phone, PhotoUrl, Rating, ShippingAddress, ShippingCity, ShippingCountry, ShippingGeocodeAccuracy, ShippingLatitude, ShippingLongitude, ShippingPostalCode, ShippingState, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Twitter__c, Type, Website FROM Account"/>

                <entry key="process.operation" value="extract"/>

                <!-- <entry key="process.mappingFile" value="c:\dataloader_test\conf\accountExtractMap.sdl"/> -->

                <entry key="dataAccess.type" value="csvWrite"/>

                <entry key="dataAccess.name" value="c:\dataloader_test\dataexports\extract.csv"/>

            </map>

        </property>

    </bean>

</beans>

 

I have change the login credentials and password for security reasons.

This exports my data from the "Account" object into a .csv file.

 

I would like to know how i can export all data from every object from our Org.

 

I hope someone in this community can provide me an example or maybe a better way to achieve this?

2 Kommentare
  1. 4. Mai 2021, 10:18

    Thank you Dennis for your reply.

    Meanwhile i have found and scripted a solution which will work for us now.

    Using the free tool from

    https://fuseit.com/contact/downloads/fuseit-sfdc-explorer/

    and another free tool for downloading the Metadata i have created some scripts to schedule this on a Windows machine.

    And it will email the task event results so i can monitor if backups where successful.

    This way we at least have a weekly data export with Metadata.

0/9000