Do replication on a different drive

86 views Asked by At

Is it possible to replicate a database.couch on a different drive on the same server as the live database? Or should I create it and then move it to where I wanted? I have couchdb Futon 1.6.1.

I am trying to replicate trough the portal, this way, please see image:

enter image description here

The only thing is that I am keep getting this error:

[Mon, 18 Sep 2017 17:13:14 GMT] [info] [<0.230.18>] 127.0.0.1 - - POST /_replicate 500

[Mon, 18 Sep 2017 17:13:14 GMT] [error] [<0.230.18>] httpd 500 error response: {"error":"db_not_found","reason":"could not open F:\MyReplications\testdb_rep"}

Can someone help me how to do it?

Thank you!

2

There are 2 answers

2
Alexis Côté On

When using the _replicate endpoint, you have to specify the source database with its remote URL or the local name.

The local name means the name of the database for this instance of CouchDB. In no way, you can specify a disk path to a .couch files. The replication protocol does not use local files.

0
Reenactor Rob On

CouchDB provides for this with PouchDB. I wanted to do the same thing myself.

https://pouchdb.com/guides/replication.html

From the PouchDB guide:

Fancy replication Any PouchDB object can replicate to any other PouchDB object. So for instance, you can replicate two remote databases, or two local databases. You can also replicate from multiple databases into a single one, or from a single database into many others.

This can be very powerful, because it enables lots of fancy scenarios. For example:

You have an in-memory PouchDB that replicates with a local PouchDB, acting as a cache. You have many remote CouchDB databases that the user may access, and they are all replicated to the same local PouchDB. You have many local PouchDB databases, which are mirrored to a single remote CouchDB as a backup store. The only limits are your imagination and your disk space.