couchdb-corrupted-document
v1.0.11
Published
Search and destroy corrupted documents.
Downloads
2
Readme
couchdb-corrupted-document
Search and destroy corrupted documents.
Corrupted documents break the indexing process, this tool helps you find and handle the document(s) which are causing a problem.
How it works
Request all documents from the CouchDB server, report failed retrievals.
Requirements
- Views should not be indexed during this period
Usage
Step 1
Run cdbcd --detect -s <http(s)://server> -u <user> -p <password> -d <db> > failed.json
Step 2
Take first 5000 keys
Step 3a
Check whether all selected keys can be retrieved in batch
Step 3b
If the batch fails, test keys individually
Step 4
Remember failed keys.
Step 5
Take next 5000 keys, goto Step 2
if found.
Step 6
Output failed keys in JSON format to stdout.
Step 7
Run cdbcd --delete < failed.json
Transfer
Copy documents from one database to the other, skipping and reporting failed documents.
Step 1
Run cdbcd --transfer -s <http(s)://server> -u <user> -p <password> -d <db> --ts <http(s)://server> --tu <user> --tp <password> --td <db>