Symbolic Link Joy

Let's say you have a server. It runs the frobnicate service. The problem is you have to upgrade the frobnicate service every so often. Sometimes you have to "roll back" to an old version.

What to do?

Lately I've been thinking like this:

$ cd /usr/local/
$ mkdir frobnicate-dist
$ cd frobnicate-dist
$ install frobnicate1
$ install frobnicate2
$ ln -s frobnicate2 current
$ cd /usr/local
$ ln -s frobnicate-dist/current frobnicate

The result is that /usr/local/frobnicate is our currently running frobnicate. If you need to change the currently running frobnicate... change the frobnicate-dist/current and all frobnicate versions are in the /usr/local/frobnicate-dist directory.

Perhaps frobnicate-versions?

Just a thought.