-
Hi! Context:I'm looking for the best way to backup a CouchDB cluster. Each node of the cluster has a name with its DNS address in it, like recommended here. The cluster has a lot of small DBs (I use the perusers database approach). From the backup data, I'd like to be able to quickly create a new CouchDB node for testing. For a long time, I used replication as recommended here. The second approach proposed in the documentation is to do a copy of My idea:Backup data with a copy of The procedure would be:
I have two questions on this procedure:
Thanks for reading! I hope you are interested in what I'm trying to do. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
My question in summary: is it safe to use I have shards which belonged to a now dead |
Beta Was this translation helpful? Give feedback.
-
I am currently investigating options for multi-cluster backups. Did you solve your problem yet? I have some general questions regarding the different approaches you have mentioned (neglecting changing node names). Maybe you can help me. The CouchDB backup documentation does not say anything explicitly about backups for multi-node setups. Approach 1 Replication: I think when you backup a database from a multi-node cluster through replication you'd replicate it into a separate single-node to have all the data in one single place. Does it make sense? But it needs to be considered that you replicate only the most recent version of a document and the revision history is not replicated:
However, I want to backup the revision history, too. Approach 2 Copying: Do you need to copy .couch/.shard files on every single node to backup your complete data, because your data is distributed over the nodes and not all nodes have the same data?
There is also another approach that was not mentioned before: @cloudant/couchbackup.
|
Beta Was this translation helpful? Give feedback.
-
Hey! Following this discussion, I, and the team I belong to, created a small tool to help us backup and restore our production servers: Under the hood it backups CouchDB data folder, and during restoration it updates CouchDB shards placement using If you read this, thanks for your time! |
Beta Was this translation helpful? Give feedback.
Hey!
Following this discussion, I, and the team I belong to, created a small tool to help us backup and restore our production servers:
https://github.com/tolteck/couchcopy
Under the hood it backups CouchDB data folder, and during restoration it updates CouchDB shards placement using
PUT /_node/{node_name}/_dbs/{db_name}
, to match the new cluster erlang node name.If you read this, thanks for your time!