Skip to content

CLI per eseguire backup di database MySQL e PostgreSQL

Notifications You must be signed in to change notification settings

Mx444/oclif-postgres-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 db-backup-cli

db-backup-cli è una utility CLI scritta in TypeScript per il backup di database generici. Supporta attualmente MySQL e PostgreSQL.

🚀 Installazione

Per installare le dipendenze, eseguire:

npm install

🛠️ Utilizzo

Per eseguire il backup di un database, utilizzare il comando:

node dist/index.js backup --dbType <tipo-di-database>
npm run pg
npm run mysql

Sostituire <tipo-di-database> con mysql o postgres.

⚙️ Configurazione

Creare un file .env nella radice del progetto e aggiungere le seguenti variabili di ambiente:

DB_USER=tuo_utente
DB_PASSWORD=tua_password
DB_HOST=localhost
DB_PORT=porta_database
DB_NAME=nome_database

📜 Script npm

  • build: Compila il progetto TypeScript
  • start: Avvia il progetto in modalità sviluppo
  • test: Esegue i test con Jest

🧪 Test

Per eseguire i test, utilizzare:

npm test

📄 Licenza

Questo progetto è sotto licenza MIT. Vedi il file LICENSE per maggiori dettagli.

About

CLI per eseguire backup di database MySQL e PostgreSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published