This post also serves as a note to self when I do another upgrade in the future.
It’s still not clear to me of what’s the best practice for upgrading a CouchDB installation. From the mailing list, some people suggested backing up the config and database files, uninstalling the old version, then installing the new version. But, really, what’s involved in uninstalling a CouchDB installation? manually deleting the files from the old installation? I had the same confusion when I tried to do the upgrade on OS X, once from a compile from source, and another from a CouchDBX installation.
So instead of ‘the best practice’, I’ll just share what worked for me. I simply installed the new version using the same way as when I installed the old version, i.e. compile from source, and the files from 1.0.1 installation overwrote the files from 0.11.0 . Here’s what I did:
I searched for CouchDB config and database files, and found them in /usr/local/etc/couchdb/local.ini and /usr/local/var/lib/couchdb/mydatabase.couch . I then backed up those files.
The fact that I found those files under /usr/local indicated that I must’ve used –prefix=/usr/local when I installed 0.11.0 .
I downloaded the source code of CouchDB 1.0.1, then ran the usual:
./configure –prefix=/usr/local make sudo make install
Voila, CouchDB 1.0.1 was installed, the config and database files were still intact, everything worked fine.