Ruby, JavaScript, Sass, iOS. Stinky Cheese & Beer Advocate. Working at CustomInk and loving it!

Protip: Exclude Your RVM Install From Time Machine Backups

You may not realize it, but that ~/.rvm directory is getting big and may be hurting your Time Machine backups. Especially if you are doing a lot of development. I just checked mine today.

$ du -skh ~/.rvm/gems
1012M   /Users/kencollins/.rvm/gems

Ouch! That's around 1gig of stuff that is pointless to backup just in the gems directory. I frequently blow away certain rubies and install them again using various rake tasks and just found out today that you have to pass the --gems option to rvm remove to clean those old gemsets out. Either way, that whole rvm directory can just be ignored from Time Machine backups. Here is how, there is really only one tricky part.

First, open up your System Preferences, then open up the Time Machine pref pane. From here click on the "Options...". Within this window you will be able to add a folder to be excluded from backup. Hit the "+" button to add a directory. Now here is the tricky part, your rvm directory is prefixed with a period and hence is invisible to the normal finder windows. Thankfully all Mac file windows can use a keyboard shortcut. Hit Command+Shift G. That will blind down a "Go to the folder:" window. Simply type in ~/.rvm here and hit "Go". Now choose "Exclude" from the main file window. Your done!

Time Machine Exclude Window