Skip to content

A Python script to download all non-design docs from a CouchDB database.

License

Notifications You must be signed in to change notification settings

tephyr/just-docs-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just docs downloader

A Python script to download all non-design docs from a CouchDB database. Useful for automated backups into a simple text file.

CouchDB's _all_docs API returns all keys, or all docs, or a subset based on numeric indexes, but cannot easily filter specific documents by their ids. Since design documents are normally very large, and usually do not need to be backed up (since they are typically code installed into CouchDB), this script filters them out and then writes the JSON to a text file.

Installation

  1. Install Python.
  2. Install pip, if necessary.
  3. pip install -r requirements.txt

Usage

# To show all options.
just-docs-downloader.py --help

# Example call, without authentication.
just-docs-downloader.py --serverurl http://127.0.0.1:5984 --dbname=any-database \
--output=/full/path/to/output.file

# Example call, with basic authentication.
just-docs-downloader.py --serverurl http://127.0.0.1:5984 --dbname=any-database \
--output=/full/path/to/output.file --username=user --password=p@$$w0rd

License

The MIT License (MIT).

About

A Python script to download all non-design docs from a CouchDB database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages