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 🙏

© 2026 – Pkg Stats / Ryan Hefner

backupify-cli

v1.0.3

Published

A cli tool to backup MySQL, PostgreSQL, MongoDB databases with options for compression and cloud upload.

Readme

backupify-cli

A simple command-line tool to back up MySQL, PostgreSQL, and MongoDB databases. It supports options for compression and cloud storage upload.

Installation

To install this package globally, run the following command:

npm install -g backupify-cli

Usage

backupify-cli --db --user --password --host --port --dbname --compress --cloud

Backing up the database

backupify-cli --db <db> --user <user> --password <password> --host <host> --port <port> --dbname <dbname> --compress --cloud

Options:

  • d, --db <db>: Database type (mysql, postgres, mongodb).
  • u, --user <user>: Database username.
  • p, --password <password>: Database password.
  • h, --host <host>: Database host.
  • P, --port <port>: Database port (default is 3306 for MySQL).
  • n, --dbname <dbname>: Database name to back up.
  • t, --type <type>: Backup type (full, incremental, differential).
  • c, --compress: Compress the backup file into a zip archive.
  • -cloud: Upload the backup to cloud storage (coming soon).

Example

backupify-cli --db mysql --user root --password mypassword --host localhost --port 3306 --dbname mydb --compress --cloud

This will back up the mydb MySQL database running on localhost to a compressed zip file and upload it to cloud storage (if cloud functionality is implemented).

How It Works:

  1. MySQL Backup: A full database dump is created using mysqldump. The dump is saved to a .sql file (or compressed .zip file if -compress is used).
  2. PostgreSQL Backup: The tables from the public schema are exported to a CSV file, saved to the backup path.
  3. MongoDB Backup: All documents from each collection are exported as a JSON file.
  4. Compression: Optionally, the backup file can be compressed into a .zip file using archiver.
  5. Cloud Upload: While the cloud upload feature is not yet implemented, the -cloud flag is reserved for future use to upload backups to cloud storage.

Example Scenarios

  • Full Backup (with compression):

    backupify-cli --db mysql --user root --password secret --host localhost --port 3306 --dbname mydb --compress
    
  • Backup to Cloud (coming soon):

    backupify-cli --db postgres --user admin --password secret --host localhost --port 5432 --dbname testdb --compress --cloud
    

How to Contribute

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-name).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add feature').
  5. Push to the branch (git push origin feature-name).
  6. Create a new Pull Request.

License

MIT License


Troubleshooting

If you encounter any issues, here are a few things you can check:

  1. Database Connectivity: Ensure that the database host, port, username, and password are correct.
  2. File Permissions: Ensure that you have the appropriate permissions to read from the database and write to the destination folder (e.g., Downloads).
  3. Backup Type: The backup type is set to full by default. If you're running incremental or differential backups, make sure your database supports that type.
  4. Cloud Upload: Cloud upload functionality is reserved for future implementation. Please refer to the documentation when this feature is available.

License

This project is licensed under the MIT License - see the LICENSE file for details.