Setting Up Daily Salesforce Contacts Backup to Dropbox

In this tutorial we will show how to configure a daily Salesforce contacts backup to Dropbox. The tutorial can actually be applied for backing up any Salesforce objects.

ExpandedToggleIcon        Creating Connections

In order to export data from Salesforce to a file, uploaded to Dropbox, first we need to create connections to Salesforce and Dropbox. If you have already created the necessary connections, you may skip these steps. To create a connection to Salesforce, perform the following steps:

1.Click Connections in the menu on the left side of the page to switch to the Connections page.
2.On the Connections page click the New button.
3.In the opened pane click Salesforce.
4.Specify the connection Name, for example, Salesforce1.
5.From the Environment drop-down list select the Salesforce environment type to import data to.
6.From the Authentication drop-down list select the authentication method for connecting to Salesforce. If you don't mind storing your Salesforce credentials on our Skyvia server, select User Name & Password. If you prefer not to store your credentials, select OAuth 2.0.
 
salesforce-connection-oauth
7.If you have selected User Name & Password, on the previous step, specify your Salesforce account e-mail, password, and security token. Otherwise, if you have selected OAuth 2.0 authentication, click the Log In with Salesforce button and login via the Salesforce website on the opened page. The result OAuth token will be stored in the connection data. Your Salesforce credentials will not be stored on our website.
 
Login-to-Salesforce
8.Click the Save button to save the connection.
 
salesforce-connection-oauth-filled

To create a connection to Dropbox, perform the following steps:

1.Click Connections in the menu on the left side of the page to switch to the Connections page.
2.On the Connections page click the New button.
3.In the opened pane click Dropbox.
4.Specify the connection Name, for example, Dropbox1.
 
dropbox-connection
5.Click Log In with Dropbox.
6.Enter your Dropbox credentials and click Sign In
 
dropbox-sign-in
7.Click the Allow button.
 
dropbox-allow
8.Click the Save button to save the connection.
 
dropbox-connection-filled

Now we have the necessary connections created. Let's create a package that performs the necessary operation.

ExpandedToggleIcon        Creating Package

Now let's create the corresponding export package.

1.Click Integration in the menu on the left side of the page.
2.Click the New button in the top right corner of the page.
3.Click Export.
4.In the Source header click Select and select Salesforce in the drop-down list.
 
source-type-selection
5.Select Salesforce1 in the Source Connection drop-down list.
 
source-connection-salesforce
6.In the Target header click My PC and select Dropbox in the drop-down list.
 
select-target-type-dropbox
7.Select Dropbox1 in the Source Connection drop-down list.
 
select-target-connection-dropbox
8.Click the + Add task to open the Task Editor.
9.From the Object drop-down list select Contact.
10. Select the check box near Contact to export all the Contact fields.
 
export-task-contact
11. Click the Save button at the bottom of the Task Editor.

By default, Skyvia creates a CSV file with the name of the exported object (in our case "Contact") and appended timestamp of the export operation, separated by the underscore character. Thus, the new files will not overwrite the older ones. However, you can disable adding a timestamp if you want the files to be overwritten in the package Naming options. Or you can set a custom name for the result file in the Target File Name box in Task Editor. In this case, the timestamp will also not be added to the file.

If you need to backup several Saleforce objects at once, you may simply add more import tasks with the necessary object in the same way - just repeat the steps 8 - 11 selecting the necessary objects instead of Contact.

 

ExpandedToggleIcon        Scheduling Package Execution

After we have created the export package for performing backup, we want it to run periodically in order to always have a fresh backup. For this, we will configure the package to run every day on a specified time.

If you have saved the package, open it for editing. For this, on the Package Details page click the Edit button, or on the Integration Packages page point to the gear button in the Action column of the package row and then click the Edit button.

Perform the following actions to set the schedule:

1.Under Schedule (at bottom left of the package editor) click the Set schedule button.
 
schedule-empty
2.In the Run every drop-down list select Day.
3.Set the backup operation execution time near Occur once at.
4.Optionally select At a specific time in the Starting list and specify the necessary date and time, after which the automatic package execution is started on schedule if you want to delay it.
5.Optionally specify your Time Zone.
6.Save the package.

schedule-daily

After this our package will run automatically every day on the specified time.

You can also visit Scheduling Packages to get more detailed information on setting a package schedule.

That's all, the package is created. It will back Contacts up to CSV files to Dropbox. To restore Contacts from a CSV file, you can use Import package.