-
I'm trying to backup and restore a CouchDB following the official documentation: https://docs.couchdb.org/en/latest/maintenance/backups.html "However, you can also copy the actual .couch files from the CouchDB data directory (by default, data/) at any time, without problem. CouchDB’s append-only storage format for both databases and secondary indexes ensures that this will work without issue." Since the doc seems to not show clearly the steps to restore from files, i copy the entire data folder, build up a local CouchDB docker container and try to paste the files into container opt/couchdb/data folder. But what i get when i start/restart the container and access localhost:5984 to see the databases, is: "This database failed to load." What should i do after copy the files? Paste directly should work? What is the right time to paste? Should i create the DBs before? Thank you all |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Check that your Otherwise you will need to edit the shard maps for every database in the special node-local |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm facing the same issue and cross checked the vm.args file as well. Couchdb data was copied from cloud to linux env, the data was copied one shard folder at a time and post spinning up couchdb on linux env, we're seeing this issue of "This database failed to load." I have verified the file ownership of the couchdb data as well and can see its as expected. Could you please share steps to change every shard name to the new names ? Or if there any other suggestions ? Appreciate any help. Thanks |
Beta Was this translation helpful? Give feedback.
Check that your
vm.args
file has the same node name as the other machine. You're looking for the line that starts with-node
and by default is either-name [email protected]
or-name couchdb@localhost
.Otherwise you will need to edit the shard maps for every database in the special node-local
_dbs
database, which can be a pain.