npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@catalpa_international/pouchdb-dump-cli

v2.0.11

Published

Tool to dump from a PouchDB/CouchDB database

Downloads

3

Readme

PouchDB Dump CLI

This is a direct copy of Nolan Lawson's pouchdb-dump-cli package, with only the referenced packages updated to current versions and the version number slightly bumped to reflect that change.

The original text of the README.md from his project follows:

Dump a PouchDB or CouchDB database to a file, or to multiple files. Then you can load it into another PouchDB or CouchDB database.

When you do so, it will be as if you had replicated from one database to the other, but without all the standard HTTP chattiness of the CouchDB protocol.

In other words, this is a very fast way to do initial replication. And it's also safe to do multiple times, since the "load" operation is idempotent.

To load the dump file, use pouchdb-load.

To dump from within your JavaScript code (either in Node.js or in the browser), just use pouchdb-replication-stream directly.

Usage

To install globally:

$ npm i -g @catalpa_international/pouchdb-dump-cli

To dump a CouchDB:

$ pouchdb-dump http://localhost:5984/mydb > dump.txt

To dump a LevelDB-based PouchDB:

$ pouchdb-dump /path/to/my/db > dump.txt

Full usage and examples:

Examples:
  pouchdb-dump http://localhost:5984/mydb > dump.txt                             Dump from the "mydb" CouchDB to dump.txt
  pouchdb-dump /path/to/mydb > dump.txt                                          Dump from the "mydb" LevelDB-based PouchDB to dump.txt
  pouchdb-dump /path/to/mydb -o dump.txt                                         Dump to the specified file instead of stdout
  pouchdb-dump /path/to/mydb -o dump.txt -s 100                                  Dump every 100 documents to dump_00.txt, dump_01.txt, dump_02.txt, etc.
  pouchdb-dump http://example.com/mydb -u myUsername -p myPassword > dump.txt    Specify a CouchDB username and password if it's protected


Options:
  -h, --help         this help message                                    
  -o, --output-file  output file (else will dump to stdout)               
  -u, --username     username for the CouchDB database (if it's protected)
  -p, --password     password for the CouchDB database (if it's protected)
  -s, --split        split into multiple files, for every n docs 

Changelog

2.0.0

2.0.0 is a breaking change that increases the default batch size for non-split dumps from 1 to 100. This makes the out-of-the-box performance of this tool much beter. You can still get one-doc-per-line if you set the --split to 1.

I doubt anybody actually wants that, but I'm still incrementing the major version.

Note: This does not break compatibility with pouchdb-load. pouchdb-load will still accept dumpfiles created with either 1.x or 2.x.