Automate SVN/Git Backups of Entire Salesforce.com Organizations

The following solution involves two popolar SCM (SVN and Git), an always-on server (I use Windows, you may want to opt for the cloud) and a few free tools. You will need the Force.com Migration Tool, Apache Ant, and Java JDK. Start by setting things up with the following checklist:

If you want to schedule the script in Windows, all you need to do is open the command prompt; and run the bash executable passing the script path as parameter, note that the whole process takes place in the working directory.

Please note: the script is for demonstration purpose only and comes with no guarantees. Also, this may be out of date or I could have made mistakes Please leave a comment below and I'll be happy to fix it for you.