On Sun, Mar 15, 2009 at 7:41 AM, Chris Anderson <[email protected]> wrote:
> On Sun, Mar 15, 2009 at 6:56 AM, Jeff Hinrichs - DM&T
> <[email protected]> wrote:
>> On Sat, Mar 14, 2009 at 10:35 PM, Chris Anderson <[email protected]> wrote:
>>> On Wed, Mar 11, 2009 at 4:51 PM, Damien Katz <[email protected]> wrote:
>>>> For importing existing docs, I think you could just use the
>>>> all_or_nothing:true option and save the multiple copies of the same
>>>> documents and they'll all be saved, and you don't have to worry about the
>>>> _revisions stuff.
>>>>
>>>
>>> I've posted a script that copies between two running CouchDB
>>> instances. I'm using the all_or_nothing option. It does attachments
>>> inline using base64 encoding because it mostly works. I think if you
>>> have attachments so big that they can't be buffered, you probably want
>>> to avoid bulk docs anyway. If anyone desperately needs such a script
>>> you might be able to convince me to modify what I've written.
>>>
>>> Blog post with script and instructions here:
>>>
>>> http://jchrisa.net/drl/_design/sofa/_show/post/Upgrading%20CouchDB%20databases%20to%20trunk
>>>
>>
>> Chris,
>> Does this migrate conflicted documents or does it ignore them?
>>
>
> yes, it migrates conflicts. It does document requests with
>
> GET /db/docid?open_revs=all&attachments=true
>
> which gives a copy of each doc rev leaf node (that is the head rev and
> any conflict revs).
>
> Once I figured out that the same request works for conflicted and
> normal docs, the script got much simpler.
>

I forgot to mention that it just strips the _rev from the original
documents, so in the case of conflicts the winning rev could change.

If this is unacceptable for someone's application it should be possible to fix.

-- 
Chris Anderson
http://jchris.mfdz.com

Reply via email to