incubator-couchdb-user mailing list archives

On 2 January 2012 21:43, Kevin R. Coombes <kevin.r.coombes@gmail.com> wrote:
> Hi,
>
> I am currently running CouchDB 1.0.1 on a 64-bit Windows 7 machine. I know
> this version is somewhat old, and I would like to upgrade to something
> newer. My main reason for wanting to upgrade is that I am currently unable
> to _replicate design documents along with the rest of the database
> (regardless of where and how many times I supply the relevant admin
> passwords...).
Hi Kevin,
"It works for me" using 1.0.2 and should be the same for 1.0.1.
Apologies if this is simplistic, but:
You don't happen to have any weird characters, or : or @ in your passwords?
Can you make a new DB using curl -vX PUT $user@$passwd:$host/newdb ?
Can you demonstrate the replication failure using curl.exe? The syntax,
-vX POST output from curl, and both couch logs with debug logging enabled
on a pastie site please if it fails.
Refer to http://wiki.apache.org/couchdb/Quirks_on_Windows for quoting
syntax under windows.
> I tried previously to upgrade in place to something in the 1.1.x series, and
> after upgrading, all of my CouchApp databases appeared to have something
> broken in the JavaScript related to the base URI. So I backed out,
> reinstalled the old version, and waited for an opportunity when I might have
> more time to figure out what was going on. That time has arrived...and so I
> have a series of questions.
>
> [Question 1]
> Does there exist somewhere a "feature comparison" between the 1.0.X and
> 1.1.X series of builds? The Wiki installation page
> (http://wiki.apache.org/couchdb/Installation) has a comparison of the
> dependencies, but not the difference in features.
#1 https://github.com/apache/couchdb/blob/1.1.1/CHANGES
> The feature I am most interested in at the moment is that I would like my
> existing CouchApp JavaScript code to continue to work....
Re JS changes, poking around in:
https://github.com/apache/couchdb/tree/1.1.1/share/www/script and
https://github.com/apache/couchdb/commits/1.1.1 should help.
> The second most important feature is the ability to _replicate design
> documents along with the rest of the database. Preferably with instructions
> on how to do this, including details about when and where to supply admin
> passwords.
Supply admin passwords everywhere, at least where you need to write ddocs.
If possible, use the same couchdb version at both ends.
But 1.0.2 -> 1.1.1 works for me.
Sacrifice a goat and get your replication - the same URLs should work
in futon and via curl.
unix style:
curl -H "Content-Type: application/json" \
-vX POST http://admin:passwd@localhost:5984/_replicate \
-d '{"source":"newdb",
"target":"http://admin:passwd@muse.iriscouch.com:5984/newdb"}'
Windows style, using () to spread across lines in cmd.exe:
d:\couch> (curl.exe -H "Content-Type: application/json"
-vX POST http://admin:passwd@localhost:5984/_replicate
-d "{\"source\":\"newdb\", \"target\":
\"http://admin:passwd@muse.iriscouch.com:5984/newdb\"}")
* About to connect() to localhost port 5984 (#0)
* Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 5984 (#0)
* Server auth using Basic with user 'admin'
> POST /_replicate HTTP/1.1
> Authorization: Basic YWRtaW24fGFzc3dk
> User-Agent: curl/7.21.1 (i386-pc-win32) libcurl/7.21.1
> Host: localhost:5984
> Accept: */*
> Content-Type: application/json
> Content-Length: 95
>
< HTTP/1.1 200 OK
< Server: CouchDB/1.0.2 (Erlang OTP/R14B)
< Date: Tue, 03 Jan 2012 02:02:38 GMT
< Content-Type: text/plain;charset=utf-8
< Content-Length: 375
< Cache-Control: must-revalidate
<
{"ok":true,"session_id":"e59e8d658939d6b460dccb5d935139a5","source_last_seq":4,"history":[{"session_id":"e59e8d658939d6b460dccb5d935139a5","
start_time":"Tue, 03 Jan 2012 02:02:33 GMT","end_time":"Tue, 03 Jan
2012 02:02:36 GMT","start_last_seq":0,"end_last_seq":4,"recorded_seq":4,
"missing_checked":0,"missing_found":1,"docs_read":1,"docs_written":1,"doc_write_failures":0}]}
* Connection #0 to host localhost left intact
* Closing connection #0
> Which leads to
> [Question 2]
> Should I upgrade to 1.0.3 or to 1.1.1 to get the features I want?
#2 In ignorance of your requirements I guess 1.0.3 will be closest in
JS compatibility. But 1.1.1 has more features, better performance and
the windows build uses the newer SpiderMonkey 1.8.5 js engine too.
> [Question 3]
> I have no interest in compiling CouchDB from source for this machine. The
> Wiki pages "http://wiki.apache.org/couchdb/Installing_on_Windows" and
> "http://wiki.apache.org/couchdb/Windows_binary_installer" point to at least
> three different sources of binary installers. One of those links (for
> couchdb-1.0.2) is no longer valid, so it would be nice if someone removed
> it. The other two links point to similar-looking pages on github. It would
> be really helpful if someone would document what the differences are between
> these pages, and why two competitors exist. It would be even more helpful
> if the community would declare one of them the "official" distributor for
> Windows installers.... In any event, why should I pick one of these
> distributors of windows binary installers over the other?
#3 Wiki cleaned up, feel free to massage it further if needed. The main website
will get tackled when I'm no longer "homeless" in Europe.
Couchbase = commercial support & different feature set - e.g. geocouch ready.
My builds = cut directly off Apache CouchDB source and regularly updated.
I'll take your money too if you want.
> [Questions 4 -- Infinity]
> Is there an official guide or set of recommendations for upgrading? Do I
> upgrade in place? Do I have to uninstall previous versions before installing
> the new version? If I uninstall, what gets left behind?
>From http://wiki.apache.org/couchdb/Quirks_on_Windows, backup,
uninstall/reinstall,
restore. Your local.ini, var/* and etc/* will not be deleted by the uninstaller,
and will unchanged and should just work in the new version, whichever you pick.
For example,
D:\couch\1.0.2>dir /s/b
D:\couch\1.0.2\etc
D:\couch\1.0.2\var
D:\couch\1.0.2\etc\couchdb
D:\couch\1.0.2\etc\couchdb\local.ini
D:\couch\1.0.2\var\lib
D:\couch\1.0.2\var\log
D:\couch\1.0.2\var\lib\couchdb
D:\couch\1.0.2\var\lib\couchdb\.delete
D:\couch\1.0.2\var\lib\couchdb\couch.uri
D:\couch\1.0.2\var\lib\couchdb\newdb.couch
D:\couch\1.0.2\var\lib\couchdb\_users.couch
D:\couch\1.0.2\var\log\couchdb
D:\couch\1.0.2\var\log\couchdb\couch.log
If you can afford the performance impact, I'd immediately compact if you
have lots of docs, and on completion, trigger a view update (per ddoc)
if you have large views.
A+
Dave