There are a couple solutions both paid and free for backing up your Salesforce.com Metadata in addition to using an IDE like Eclipse.
If you need something ‘free’ and on a schedule the best solution I have found has been:
Alan Morey’s Force Meta Backup
To use this tool though there’s a couple of prereq’s that have to be loaded:
- Java Runtime (JRE)
- Apache Ant
- Groovy
I have used this solution for years and Window’s has been my go to in the past due to usually using a VM…
So how to do this easily and quickly on a Mac?
Install the following: Home Brew which is a package manager for MacOS X
Once installed run the following commands (assuming you have admin to your machine):
- brew cask install java
- This will install the Java JRE
- brew install ant
- This installs Ant
- brew install groovy
- This installs…groovy
Now you just need to:
- Download and Unzip the Force-Meta-Backup from the link above
- Make a copy of the build.sample.properties file
- Rename build.sample.properties to build.properties
- Edit build.properties
- Add username and password
- Validate Production or Sandbox
- Run the following command: ant backupMetadata
This will create a folder called ‘Build’ which is where all of your Salesforce.com instance metadata will get backed up to. My recommendations when automating is to only zip up (7zip of course) the folders you need as you will get documents folder which can be a bit hefty to archive constantly.