Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best version control system for managing home directories

I have 3 Linux machines, and want some way to keep the dotfiles in their home directories in sync. Some files, like .vimrc, are the same across all 3 machines, and some are unique to each machine.

I've used SVN before, but all the buzz about DVCSs makes me think I should try one - is there a particular one that would work best with this? Or should I stick with SVN?

like image 442
Zack Elan Avatar asked Sep 01 '08 20:09

Zack Elan


3 Answers

I've had this problem for years, and I don't think version control is necessarily the right way to go. I've had good success with the the Unison file synchronizer which is designed for the express purpose of maintaining consistent home directories on two machines. I'm currently managing seven replicas with unison, and the details are a bit tricky, but it is a great tool and if you start with two you will be extremely pleased.

The key difference between Unison and a VCS is that Unison is willing to delay dealing with conflicts that have to be merged. Plus it gets all the defaults right. And it is fast: I use it daily, over a DSL line, to synchronize about 40GB of data.

like image 165
Norman Ramsey Avatar answered Nov 16 '22 02:11

Norman Ramsey


Any DVCS would likely work fine. My favorite is Bazaar. It would be easiest to keep your config files in .config, version that, and then symlink as appropriate.

A benefit of DVCS is that you can version the per-machine config files as well, without interfering with versioning global configs.

like image 40
John Millikin Avatar answered Nov 16 '22 02:11

John Millikin


I've had the same problem, and built a tool on top of Subversion that adds permission, ownership and secontext tracking, keeps the .svn directories out of the actually versioned trees, and adds a concept of layers so you can for example track all your config related to development, which you then only check out on machines you use for developing.

This has helped me organize my settings much better across the 50+ machines I log into.

Here's the project page. It's still a little rough around the edges, but we also use it at work to version system configuration for our 60+ servers.

In general, any version control system that uses some sort of metadata files to track stuff is going to cause you pain as is when actually using it.

like image 45
Thomas Vander Stichele Avatar answered Nov 16 '22 02:11

Thomas Vander Stichele