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

boomdump

v1.1.0

Published

easy fast mysql dumps

Downloads

17

Readme

boomp

Dump production data to your local machine like a boss.

  • MySQL - ready to use
  • MongoDB - ready to use
  • PostgreSQL - in developing

Installation

sudo npm install -g boomdump

How it works

Imagine that you are dumping data from production to a local machine.

boomp mysql production local

  1. First, boomp connects via ssh to the production server.
  2. And creates a temporary dump directory in the user's home directory.
  3. Then it dumps the data to that directory and archives the directory.
  4. Using the rsync utility, the archived dump is coping to your local home directory.
  5. The dump file is unpacked and imported into the database.
  6. All temporary directories on the production and local server are cleared. Done.

You have production data in your local database. Enjoy!

Notice 1: You must be able to access remote servers via vpn or ssh using your public key.
Notice 2: Mysql dumps uses mysql command. Mongo dumps uses mongodump and mongorestore commands.

Usage

Usage:
      boomp help [command]
      boomp mysql [from_env] [to_env]
      boomp mongo [from_env] [to_env]

Options:
  -h  print help

boomp mysql

# Dump all schemas and data
boomp mysql production local

# Specify tables
boomp mysql production local --tables="users balances"
boomp mysql production local --skip-tables="snapshots logs"

# Dump schema only
boomp mysql production local --schema
boomp mysql production local --schema --drop # drop table if exist

# Select by condition 
boomp mysql production local --where="userId=7" --tables="balances purchases"
boomp mysql production local --where="status in ('failed', 'ok')" --tables="transactions"

# You can dump not only from production to local
boomp mysql production stage
boomp mysql stage local
boomp mysql prodreplica local2

boomp mongo

# Specify collections
boomp mongo production local --collections="users balances"
boomp mongo production local --skip-collections="transactions"

# Select by condition
boomp mongo production local --where="{ _id: ObjectId('61b14e0a5ff2aa0874b7e8bb') }" --collections="users"
boomp mongo production local --where="{ userId: 7 }" --collections="balances purchases"
boomp mongo production local --where="{ status: { \$in: ['failed', 'ok'] } }" --collections="transactions"

Configs

Place config files in the /boomp directory.
Use .js and .json config formats.

/project
  /boomp
    production.js
    stage.js
    local.json
  ...
  README.md

production.js

// require mysql settings from main config
const { mysql } = require('../config/production.json');

module.exports = {
  host : 'logr.info',
  user : 'dima',
  port : 22,
  mysql: {
    host     : mysql.host,
    username : mysql.username,
    password : mysql.password,
    database : mysql.database,
  },
  mongo: {
    host     : "mongodb+srv://my.xyz.mongodb.net",
    username : "myuser",
    database : "mydb",
    password : "qwerty123",
  }
}

local.json

{
  "mysql": {
    "host": "127.0.0.1",
    "username": "root",
    "password": "123",
    "database": "thehatdb"
  },
  "mongo": {
    "host": "localhost",
    "database": "mydb"
  }
}