Code backupYou are probably doing this already. One of the possibilities is to use a cloud storage service. You can use Google Drive or Dropbox, which is my favourite. If you don't have a Dropbox account, get one (this is a referral link. If you use it, we both get extra 500MB of space to use) and install Dropbox.
You can simply put your workspace or your project directory inside Dropbox (symbolic links work too). Each change is automatically synced with Dropbox server. As a bonus you have your codes available from anywhere.
Version control systemVCS is used to track the history of changes and it helps when more people collaborate. There are many popular VCS such as CSV, SVN and Git. We are going to use Git - if you are using the Eclipse bundled with ADT, you already have Git!
There are version control hostings available, for example GitHub. They have advantages and disadvantages (such as paid private repositories). It's up to you what you prefer. This guide uses local Git inside Dropbox.
Git + DropboxFirst create a directory called "git" in your Dropbox folder. Create a new Android application project in that directory.
Next right click on the project and select Team -> Share Project. You will see the Git dialog. Check the "Use or create repository in parent folder of project", then select the project, click on the "Create Repository" and "Finish".
When you work with any VCS, you have to identify yourself. See the settings in Git preferences. And that's it. Now you can commit your codes to Git and all your data will be saved on your local machine and Dropbox servers, including the Git metadata.
When you setup the project location and git this way, both the codes and the Git metadata will be saved in Dropbox. For more information how to use Git in Eclipse, see this tutorial.