apache / apache/couchdb

I'm trying to backup and restore a CouchDB following the official documentation:

Open
#4,486 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

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."

![lxciS](https://user-images.githubusercontent.com/5803915/111494687-72843380-871d-11eb-950a-1a3780f561d2.png)

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

_Originally posted by @defremont in https://github.com/apache/couchdb/discussions/3436_

Contributor guide

Open the contributing guide

Research direction

Start with the backup and restore documentation at https://docs.couchdb.org/en/latest/maintenance/backups.html and compare its claims with the reported Docker data directory at /opt/couchdb/data. Determine the supported restore sequence, including when files should be copied and whether databases must already exist; done means the documentation gives clear, verified steps that avoid the reported load failure.

Written by the indexing model from the issue text.

Assessment

Domain
databases, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.