views:

914

answers:

15

Like most *nix people, I tend to play with my tools and get them configured just the way that I like them. This was all well and good until recently. As I do more and more work, I tend to log onto more and more machines, and have more and more stuff that's configured great on my home machine, but not necessarily on my work machine, or my web server, or any of my work servers...

How do you keep these config files updated? Do you just manually copy them over? Do you have them stored somewhere public?

+3  A: 

You could use rsync. It works through ssh which I've found useful since I only setup new servers with ssh access.

Or, create a tar file that you move around everywhere and unpack.

JR Lawhorne
WTF? Why did you get -1 for suggesting rsync? Have some rep.
freespace
+1  A: 

I keep master versions of the files under CM control on my main machine, and where I need to, arrange to copy the updates around. Fortunately, we have NFS mounts for home directories on most of our machines, so I actually don't have to copy all that often. My profile, on the other hand, is rather complex - and has provision for different PATH settings, etc, on different machines. Roughly, the machines I have administrative control over tend to have more open source software installed than machines I use occasionally without administrative control.

So, I have a random mix of manual and semi-automatic process.

Jonathan Leffler
+4  A: 

Rsync is about your best solution. Examples can be found here:

http://troy.jdmz.net/rsync/index.html

Bishop
Again, WTF?! Another downvote for mentioning rsync. What do we have, a rsync hater? SO is baffling sometimes. Have some rep.
freespace
I love rsync but it's not very good here. Suppose you have 5 machines. With rsync, you have to designate a master and tie the others to it. If you make changes on two different machines, you can't sync them back to the master without overwriting something. Rsync has its place but this isn't it.
Just Some Guy
+2  A: 

I store them in my version control system.

Dan
+1  A: 

There is netskel where you put your common files on a web server, and then the client program maintains the dot-files on any number of client machines. It's designed to run on any level of client machine, so the shell scripts are proper sh scripts and have a minimal amount of dependencies.

Greg Hewgill
+3  A: 

It seems like everywhere I look these days I find a new thing that makes me say "Hey, that'd be a good thing to use DropBox for"

Ryan
+2  A: 

i use svn ... having a public and a private repository ... so as soon as i get on a server i just

svn co http://my.rep/home/public

and have all my dot files ...

Pierre Spring
+1  A: 

I store mine in a git repository, which allows me to easily merge beyond system dependent changes, yet share changes that I want as well.

Pi
+10  A: 

I've had pretty good luck keeping my files under a revision control system. It's not for everyone, but most programmers should be able to appreciate the benefits. Read

Keeping Your Life in Subversion

for an excellent description, including how to handle non-dotfile configuration (like cron jobs via the svnfix script) on multiple machines.

Blair Conrad
+2  A: 

I use git for this.

There is a wiki/mailing list dedicated to the topic.

vcs-home

Daniel Bungert
I do it like Daniel Bungert here, and in fact my dotfile repos is visible publicly since I share it with my friends. We pull interesting tricks from each other :)For those interested, I would be happy to divulge my git web url.
freespace
+1  A: 

Svn here, too. Rsync or unison would be a good idea, except that sometimes stuff stops working and i wonder what was in my .bashrc file last week. Svn is a life saver in that case.

DarenW
+1  A: 

Now I use Live Mesh which keeps all my files synchronized across multiple machines.

sebastian
A: 

Depending on your environment you can also use (fully backupped) NFS shares ...

Zsolt Botykai
A: 

Speaking about storing dot files in public there are

http://www.dotfiles.com/

and

http://dotfiles.org/

But it would be really painful to manually update your files as (AFAIK) none of these services provide any API.

The latter is really minimalistic (no contact form, no information about who made/owns it etc.)

dolzenko
+2  A: 

I also use subversion to manage my dotfiles. When I login to a box my confs are automagically updated for me. I also use github to store my confs publicly. I use git-svn to keep the two in sync.

Getting up and running on a new server is just a matter of running a few commands. The create_links script just creates the symlinks from the .dotfiles folder items into my $HOME, and also touches some files that don't need to be checked in.

$ cd

# checkout the files
$ svn co https://path/to/my/dotfiles/trunk .dotfiles

# remove any files that might be in the way
$ .dotfiles/create_links.sh unlink

# create the symlinks and other random tasks needed for setup
$ .dotfiles/create_links.sh
claytron