
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@neoskop/bouch
Advanced tools
Bouch is an CLI Tool to backup and restore CouchDB and PouchDB databases.
You can choose betwen JSON and BSON format and Gzip, Brotli or no compression
$ yarn global add @neoskop/bouch
$ npm install -g @neoskop/bouch
$ bouch backup http://localhost:5984/dbname
$ bouch backup --help
bouch backup <url>
Backup a couchdb database
Positionals:
url Database URL [required]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--format, -F File format (ignored in migrate), default: bson
[choices: "bson", "json"]
--compress, -C File compression (ignored in migrate), default: none
[choices: "none", "gz", "br"]
--quiet, -q Supress any non error output [boolean] [default: false]
--multi-database, -m Process multiple databases [boolean] [default: false]
--filter Filter for db names (use with --multi-database)
--rename, -r Code to rename databases in multi-database mode
--file, -f File to create
--stdout Output to stdout instead of file
[boolean] [default: false]
--chunk-size, -c Number of documents read/write at once
[number] [default: 1000]
$ bouch restore backup-file.bson http://localhost:5984/dbname
$ bouch restore --help
bouch restore <file> <url>
Restore a backup
Positionals:
file Backup file [required]
url Database URL [required]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--format, -F File format (ignored in migrate), default: bson
[choices: "bson", "json"]
--compress, -C File compression (ignored in migrate), default: none
[choices: "none", "gz", "br"]
--quiet, -q Supress any non error output [boolean] [default: false]
--multi-database, -m Process multiple databases [boolean] [default: false]
--filter Filter for db names (use with --multi-database)
--rename, -r Code to rename databases in multi-database mode
--chunk-size, -c Number of documents read/write at once
[number] [default: 1000]
$ bouch migrate http://localhost:5984/dbname http://localhost:5984/dbname-new
$ bouch migrate --help
bouch migrate <from> <to>
Copy from one database to another
Positionals:
from From Database [required]
to To Database [required]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--format, -F File format (ignored in migrate), default: bson
[choices: "bson", "json"]
--compress, -C File compression (ignored in migrate), default: none
[choices: "none", "gz", "br"]
--quiet, -q Supress any non error output [boolean] [default: false]
--multi-database, -m Process multiple databases [boolean] [default: false]
--filter Filter for db names (use with --multi-database)
--rename, -r Code to rename databases in multi-database mode
--chunk-size, -c Number of documents read/write at once
[number] [default: 100]
To backup a whole database provide the option --multi-database
.
For example: bouch backup http://localhost:5984
To filter the processed databases use the --filter
option, where you can provide a minimatch pattern.
Only works for backup
and migrate
.
For example: bouch backup http://localhost:5984 --multi-database --filter 'prefix-*'
To rename the restored databases use the --rename
option, where you can provide a JS code to manipulate the target database names.
Only works for restore
and migrate
.
Examples:
$ bouch migrate http://localhost:5984 --multi-database --filter 'prefix-*' --rename 'name.replace(/^prefix-/, "prefix2-")'
or use a file to define the renaming script.
// content of renaming.js
const map = {
foo: 'bar',
baz: 'foobar'
}
const arr = name.split(/-/);
arr[0] = map[arr[0]];
return arr.join('-')
$ bouch migrate http://localhost:5984 --multi-database --filter '(foo|bar)-*' --rename @renaming.js
MIT License
Copyright (c) 2019 Neoskop GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
CouchDB/PouchDB Backup/Restore Tool with Attachments Support
We found that @neoskop/bouch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.