
- #SETUP FORCE MIGRATION TOOL HOW TO#
- #SETUP FORCE MIGRATION TOOL ZIP FILE#
- #SETUP FORCE MIGRATION TOOL SOFTWARE#
- #SETUP FORCE MIGRATION TOOL CODE#
It is a Java/Ant based command line utility for moving metadata between a local folder and an org. I do hourly snapshots, but you can do it more or less frequently.The Ant migration tool is a free tool provided by Salesforce. Git push -v -u The last step is to automate! Schedule a script to issue the ant and git commands on a periodic basis. If you’re using git as in this example, you might issue these commands to add and commit the changes to local git repository then push it to remote: xml and put it in a new folder called src Assuming ant is installed and ANT_HOME added to your path, this will invoke the build.xml script to login to salesforce and retrieve all the desired metadata from package.
#SETUP FORCE MIGRATION TOOL ZIP FILE#
This will download a zip file extract the ant-salesforce.jar to the project folder from step 2 (e.g. Go to Setup | Develop | Tools then click Migration Tool link. Download the ant-salesforce.jar from Salesforce.
#SETUP FORCE MIGRATION TOOL CODE#
Create a new git project in your source code repository then check it out to the machine you’ll be using to perform the metadata backup.To use the Ant Migration Tool, you’ll need to have Java and Ant installed on the computer/server that will be performing the metadata backup and commit to source control.This automation greatly frees up you and your team to work in the platform, make declarative and programmatic changes directly in your sandbox or production instance, and have peace of mind that behind the scenes all the metadata is being backed up to source control! Getting Setup

#SETUP FORCE MIGRATION TOOL HOW TO#
That is a valid use case, but what I want to share with you is how to setup a very simple ant script to retrieve all the metadata from your Salesforce instance then commit the metadata to git source control so that you can begin scheduling routine backups of all your customizations. There are plenty of resources online about how to setup continuous integration with Salesforce, but those assume you are doing work in one org and wanting changes synced to other orgs.

#SETUP FORCE MIGRATION TOOL SOFTWARE#
So how do we apply the software development best practices of source control, or at least a versioned backup of our customizations, to the environment? The answer is the Migration Tool!

And if you’re not careful, it’s also very easy for other developers to accidentally overwrite those customizations and no native way to rollback. There is no commit to source code repository and there isn’t any deployment from your local machine into Salesforce. (if not, get started today!)īut after working on the platform for a while you quickly realize, as a cloud service, anytime you make an apex code change or workflow tweak or create a formula field, that change has occurred instantaneously to that Salesforce org. You maintain a backup of your code in the source code repository where you can version it and rollback to if necessary. If you’re coming to the platform with background as a traditional programmer then you’re likely accustomed to geeking out some code on your local machine then committing to a source control repository, such as git or cvs, then deploying to a server. But it also supports programmatic customizations too, such as apex classes, triggers, controllers, and visualforce pages. creating custom objects, fields, formulas, workflows, reports, etc.). With its declarative nature, many customizations require no code at all (e.g. Salesforce is a unique development environment.
