1

Can we have any automated way to restore the developer sandbox Data (by data I mean the object records and not the metadata) after it has been refreshed ? Or any way to load partial data from production to sandbox automatically ?

What is the shortest and less time-consuming way to achieve this?

Thanks! Ruchika Saxena

1
2

Immediate disclaimer - I'm a product manager for a (paid) tool that solves this challenge! Its called SmartSandbox and is the easiest way to migrate relational data from Production to Sandboxes.

Let me know if you'd like a demo sometime.

If you're looking for a free solution, I would recommend setting up dataloader.io or an equivalent dataloader with a series of dataloads to setup the records.

2

There are a few options available:

  1. Running an Apex class A recent feature in Spring '16 allows running Apex after a sandbox has either been created or refreshed.

https://releasenotes.docs.salesforce.com/en-us/spring16/release-notes/rn_deployment_sandbox_postcopy_script.htm

This approach might be useful for small amounts of data and also reconfiguring a sandbox. It might not be suitable for pulling data out of production, but if the data is static enough it may suffice.

  1. Automating the data loader

The data loader provided by Salesforce can be run from the command line. This means you could pull out the data which you need an then push this back into your sandbox.

More information on this can be found at Salesforce:

https://developer.salesforce.com/page/Using_Data_Loader_from_the_command_line

Additionally, if you use continuous integration in your projects (such as Jenkins), you can additionally enhance your deployments by populating the next org with data during deployments.

  1. AppExchange

Explore the AppExchange for rebuilt solutions (paid, usually). Doing a quick search I found several solutions for your problem, such as:

https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000qFAWEA2

Hope this helps!

1
  • There is a new feature in Summer '16 called sandbox cloning. Not had the chance to review this just yet, but this might aid you in what you want to achieve without additional products or creating a complex refresh script. – Adam May 21 '16 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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