pouchdb-community / pouchdb-dump-cli

Command-line tool for dumping a CouchDB/PouchDB database to a file
Apache License 2.0
84 stars 20 forks source link

Would be useful to pass similar options as pouchdb-replication-stream #2

Closed mikeymckay closed 9 years ago

mikeymckay commented 9 years ago

I would like to pass in a list of doc_ids, but I expect filter, views etc would be useful too. Should be easy since it is using pouchdb-replication-stream but I haven't figure it out yet from reading the code.

nolanlawson commented 9 years ago

That would be great. Maybe they can just be options on the CLI? It's kind of award to pass in JSON on the command-line, though.

mikeymckay commented 9 years ago

I will need it to script a deployment step, so at least for me, it would be fine to pass in the path of a json file.

nolanlawson commented 9 years ago

Reading from a file kinda feels icky to me. How about

pouchdb-dump --replicator-opts '{"filter": "whatever"}'

?

nolanlawson commented 9 years ago

On second thought, I think this might be too hairy for a simple CLI tool like pouchdb-dump. See https://github.com/nolanlawson/pouchdb-dump-cli/issues/11#issuecomment-133907955 for some suggestions on how you can filter using existing tools.