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

miomi-backup

v1.1.1

Published

CLI tool untuk auto backup Database & Assets dari berbagai project web (Laravel, Next.js, Go, Python, dll)

Readme

🛡️ miomi-backup

miomi-backup adalah CLI tool modern yang dirancang untuk membantu developer melakukan backup database dan assets project web secara otomatis, aman, dan sinkron.

Dibuat dengan Node.js, tool ini bersifat language-agnostic, artinya bisa digunakan untuk project Laravel (PHP), Next.js (Node), Django (Python), Go, dan lain-lain.

✨ Fitur Utama

  • Multi-Database Support: MySQL, PostgreSQL, SQLite, dan MongoDB.
  • Asset Archiving: Membungkus folder (seperti uploads atau public/storage) ke dalam satu file.
  • Sync Aware: Menyimpan database dump dan assets dalam satu paket arsip (.zip atau .tar.gz).
  • Environment Integration: Secara otomatis membaca kredensial dari file .env.
  • Built-in Scheduler: Dilengkapi dengan daemon mode menggunakan cron syntax.
  • Auto Pruning: Menghapus backup lama secara otomatis agar penyimpanan tidak penuh.
  • Restore Support: Kemudahan untuk mengembalikan database dari file backup.

🚀 Instalasi

Prerequisites

Pastikan Anda memiliki database client terinstal di sistem Anda:

  • mysql-client untuk MySQL/MariaDB.
  • postgresql-client untuk PostgreSQL.
  • mongodb-database-tools untuk MongoDB.

Cara Install

# Clone repository ini
git clone https://github.com/username/miomi-backup.git
cd miomi-backup

# Install dependencies dan link ke sistem
npm install
npm link

📖 Cara Penggunaan

1. Inisialisasi Project

Jalankan perintah ini di folder project Anda untuk membuat file backup-config.json:

miomi-backup init

2. Jalankan Backup Manual

miomi-backup run

Opsi tambahan:

  • --db-only: Hanya backup database.
  • --assets-only: Hanya backup assets.
  • --format tar.gz: Gunakan format tar.gz (default: zip).
  • --dry-run: Cek apa saja yang akan dibackup tanpa membuat file.

3. Jalankan Scheduler (Daemon)

Biarkan tool ini berjalan di background (disarankan menggunakan PM2):

miomi-backup schedule --cron "0 2 * * *"

4. Lihat Daftar Backup

miomi-backup list

5. Restore Database

miomi-backup restore --file ./backups/nama_file.zip

🛠️ Konfigurasi (backup-config.json)

Contoh isi file konfigurasi:

{
  "projectName": "my-awesome-app",
  "envFile": ".env",
  "database": {
    "type": "mysql",
    "host": "${DB_HOST}",
    "name": "${DB_DATABASE}",
    "user": "${DB_USERNAME}",
    "password": "${DB_PASSWORD}"
  },
  "assets": {
    "paths": ["./storage/app/public", "./public/uploads"],
    "exclude": ["*.log", "tmp/**"]
  },
  "output": {
    "directory": "./backups",
    "maxBackups": 10
  }
}

📄 Lisensi

MIT License. Dibuat dengan ❤️ oleh Omi.