We have a developer sandbox which is refreshed quite frequently. There are some some seed objects that need to have data so that the sandbox becomes usable. I am trying to develop a script which will automate this thing i.e. will copy data from production to sandbox for these objects. I used the command line data loader by salesforce.

-> Got stuck where i need to copy "Sales Coach" object & the child object - "Sales Coach Line Items". While loading the Sales Coach Line Items the Sales Coach lookup ids point to production but i need the ids of the sandbox. Is there way to solve this problem?

-> Also i need to migrate some attachment object records. Is this possible with CLI?

Is there any other tool or other approach that can be used to achieve the above?


4 Answers 4


You can try using Talend Open Studio for Data Integration. It's a free tool, find some info here: http://www.talend.com/products/data-integration

You can

  • export data with tSalesforceInput
  • solve lookups via components like tMap to maintain relationships
  • import data with tSalesforceOutputBulkExec or tSalesforceOutput (for attachments, you don't need to use Bulk API).

I am using this tool to migrate records (attachments too) from an org to another one and it has been very useful.

Edit: if you refresh frequently, you can save the jobs in talend and run them whenever you need to import datas to sandbox.


If you're trying to populate your Developer sandbox, you should use an app like SFXOrgData (http://www.sfapex.com) which will copy data from your Production/Sandbox to another Sandbox (i.e. your developer sandbox). I developed this application about 2 years ago for this exact purpose.

Also, if you're doing this frequently, then you can actually use the scheduler functionality in the app to "auto" refresh your sandboxes. I think this is probably a better choice since you don't have to create/maintain VLOOKUP's or use scripting to achieve the same result.


There is also the Partial Copy Sandbox available, which is cheaper than Full Copy and has an option to copy data via a template. Copy is limited to 10k records per object. Even if the sandbox-storage could hold more or all records, the 10k limit applies. Refresh is after 5 days possible. We use the Partial Copy at one of our clients and it works as expected.

  • 1
    Expect the Partial Copy Sandbox to cost about 20% of the product license cost on top. You can book it also monthly.
    – Uwe Heim
    Jul 1, 2014 at 8:27
  • How do they handle the whole related objects issue in the partial copy? We've got a lot of interrelationships between objects. If the related objects aren't there, various processes will fail.
    – Jagular
    Jul 1, 2014 at 14:01
  • 1
    As long as all object are below that magic-10k-boundary you will be fine and you'll get all the relationships copied as you would expect. If you have one or more objects above 10k record count it depends on the exact scenario. Can be little to massive rework. We ran into trouble with a junction-object used for assignment of Accounts to BusinessSegments. Fortunately we could recreate that data with a couple of APEX-Lines. In other cases it could be harder. My recommendation : try it! Since you can pay only for a month it's bearable.
    – Uwe Heim
    Jul 1, 2014 at 14:23
  • There is also an even smaller and cheaper Sandbox than Partial Copy. Its called DeveloperPro, but AFIK it doesn't have the copy-function. Hopefully SF will improve that in future or raise the 10k-limit.
    – Uwe Heim
    Jul 1, 2014 at 14:28
  • We're over the 10k limit in many kinds of records, custom and standard. It seems like an interesting experiment to try, but I think our circumstances are not well-suited to this option.
    – Jagular
    Jul 1, 2014 at 14:31

The easiest way to have all your data in a sandbox is to sign up for a full-data sandbox. Of course, Salesforce will want to charge you for that. I don't know the cost, but it's probably related to how big your db is.

You say you refresh frequently. The full-data sandbox can be updated every 30 days. If that's a problem, you might be able to get around it by talking to your Salesforce rep.

Note: nothing prevents you from updating objects, code, etc in your full data sandbox any time you want. It's the full refresh that's limited to once a month.

  • Expect the Full Copy Sandbox to cost about 30% of the product license cost on top. You can book it also monthly.
    – Uwe Heim
    Jul 1, 2014 at 8:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.