couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Ennamorato <>
Subject Re: Best way to backup and restore after going offline
Date Fri, 10 May 2013 15:45:23 GMT

Thanks that was definitely helpful.

We're having issues replicating but once it finishes we'll give this a shot.


Sent from my iPhone

On May 7, 2013, at 3:59 PM, Nils Breunese <> wrote:

> andy e <> wrote:
>> We're trying to replicate a database while connected to the great big
>> Internet (the npm repo, actually). But after it is finished replicating we
>> need to take our copy and run it in a different and offline environment.
>> What's the best way to proceed? Just backup the database file(s), then copy
>> them over to our offline instance (we do this via disc/usb/etc). Anything
>> to be aware of when doing this ("make sure to grab this file", "run this
>> command first before importing")?
> A single .couch file represents a single database. You can just copy over these files.
There's even no need to shut down the source instance (unlike when using something like MySQL
for instance).
> If you also want to copy over the generated view indexes, you can also copy over the
hidden directories in the data directory. This only makes sense if regenerating these indexes
on the target instance takes a lot of time.
>> Is there any way to pick up just the changed documents, so that the second
>> time we do this, we only have to transfer what is new (versus copying the
>> entire thing again)? That's not too big of a deal if so but would be a
>> nice-to-have.
> Updating your online copy could be done by rerunning replication from npm to your online
instance. You could use rsync to just copy over the differences in the file at the block level.
Or you could start a second CouchDB instance on the offline machine (use a different IP address
and/or port) using the updated database files on the transfer medium and run replication between
those two CouchDB instances on the offline machine.
> HTH, Nils.

View raw message