incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Hinrichs - DM&T" <>
Subject Inability to back up and restore properly
Date Tue, 07 Apr 2009 03:04:12 GMT
What is the proper way to backup and restore a couchdb?  I mean a real
proper dump/load cycle.

couchdb doesn't provide a way to do a proper dump/reload cycle which leaves
us to try and write our own.  However, if you dump a document like


There is not a single way that I can find to load an empty database and
recreate that same record.  If you put the
{'_id':'foo',''_rev':'2-xyz',...}, you get
{'_id':'foo',''_rev':'3-mno',...},  which is not the same as

In some use cases it is necessary to be able to restore data to the way it
was at a point in time.  Sometimes for logic reasons, some times for error
recovery and debugging and some times for legal reasons.  The seemingly only
way possible to do that is to bring up another couchdb instance and
replicate to it.  However, that is a bit problematic for normal long term
storage methodologies.

What is the API I should be using?   If no such api exists, is it an
oversight or just a matter of resources?  There should be a way to load data
into couch and have couchdb just accept it, keeping the _rev information
that is passed.  I am not proposing to change the mode of operation, but to
create a new one.  Even better would be to have couchdb do a /database/_dump
that streams out documents and a post /database/_load with the posted file
from the /database/_dump.

so that you have some couchdb database foo in state 'A', you dump, then
create database bar, and load the dump from foo and when the process is
finished, a replication from foo state 'A' to bar results in
{"start_time":"Tue, 07 Apr 2009 03:02:16 GMT","end_time":"Tue, 07 Apr 2009


Jeff Hinrichs

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message