couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CGS <cgsmcml...@gmail.com>
Subject Re: moving database
Date Tue, 27 Sep 2011 09:58:43 GMT
..or, if you prefer something fancier, you can type this in a terminal:

HOST="" && TARGET="" && for var in $(curl -X GET $HOST/_all_dbs | awk 
'{a = $1; sub(/\[/,"",a); sub(/\]/,"",a); split(a,b,","); for(i in b) 
{sub(/\"/,"",b[i]); sub(/\"/,"",b[i]); print b[i]}}') ; do curl -X POST 
$HOST/_replicate -d ’{"source":"$HOST/$var", "target":"$TARGET/$var"}’ ; 
done

Don't forget to fill in HOST and TARGET before running it. Just a script 
for fun (I hope I didn't make any typo or something like that).




On 09/27/2011 11:47 AM, JC de Villa wrote:
> Just copy the .couch files from the original to the VM. No need to do
> anything fancy.
>
> On Tue, Sep 27, 2011 at 5:16 PM, bryan rasmussen
> <rasmussen.bryan@gmail.com>wrote:
>
>> Hi,
>>
>> I have a number of dbs in a couchdb installation that got for no good
>> reason got moved to a virtual machine. Now I would like to just copy
>> everything over into a new machine. Can I do that by copying stuff in
>> the filesystem? Or do I have to use database replication. Is there any
>> particular tool I could use that would take a bunch of records saved
>> to a filesystem and load them into a new couchdb instance?
>>
>> Thanks,
>> Bryan Rasmussen
>>
>
>


Mime
View raw message