CouchDB replication copies active documents from a source to a destination
Answer: Replication uses a source database and a destination database, on the same instance or on different CouchDB instances. When the process finishes, every active document from the source is also in the destination, and documents deleted on the source are deleted on the destination if they were present there.
Transient and persistent
sourcethe database being copied fromdestinationthe database being copied totransienta replication with no documents backing it uppersistentthe other way to set up a replication, with documents backing it up
You can set up a replication in two ways. The first one introduced into CouchDB leads to a transient replication, with no documents backing it up.
Scheduler jobs
The main API function is add_job. It takes a rep record, which may come from a document update in a _replicator db, or from a POST to the _replicate endpoint. The scheduler will try to stop some jobs, start some new ones, and keep the running job count less than max_jobs (default 500). History length is limited based on the max_history configuration value. The default is 20 entries. History event types include added, started, stopped, and crashed. Failed replication jobs are penalized using an exponential backoff.
See also
Claims
- id: C1 claim: Replication has a source and a destination database, on the same instance or on different instances. source: S1 evidence: "Replication involves a source and a destination database"
- id: C2 claim: When replication finishes, active source documents are on the destination, and source deletions are reflected there too. source: S1 evidence: "all active documents in the source database are also in the destination database"
- id: C3 claim: The scheduler accepts a job from a _replicator database document or from a POST to _replicate. source: S2 evidence: "the result of a POST to
_replicateendpoint."
Sources
- [S1] Introduction to Replication. Apache CouchDB. https://docs.couchdb.org/en/stable/replication/intro.html . License: Apache-2.0. Accessed 2026-11-20.
- [S2] couch_replicator README. Apache CouchDB. https://raw.githubusercontent.com/apache/couchdb/main/src/couch_replicator/README.md . License: Apache-2.0. Accessed 2026-11-20.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache CouchDB, Introduction to Replication; Apache CouchDB, couch_replicator README. Apache-2.0; Apache-2.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Apache CouchDB, Introduction to Replication; Apache CouchDB, couch_replicator README. Apache-2.0; Apache-2.0.
Cite this
iinventedlight. 2026. "CouchDB replication copies active documents from a source to a destination." iinventedlight Library, iil:note:6n5ta4yc, version of 2026-11-20. https://iinventedlight.com/library/notes/couchdb-replication/. License: CC-BY-4.0.
@misc{iil_note_6n5ta4yc,
author = {{iinventedlight}},
title = {{CouchDB replication copies active documents from a source to a destination}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-20},
url = {https://iinventedlight.com/library/notes/couchdb-replication/},
note = {Permanent ID iil:note:6n5ta4yc. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- couchdb-replication.table.json (table; CC-BY-4.0)
- couchdb-replication.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/couchdb-replication.md.