Skip to content

NodeJS wrapper for mysqldump for better performance

Notifications You must be signed in to change notification settings

HOAIAN2/mysql-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mysql-backup

This is a MySQL / MariaDB dump tool written in NodeJS to dump multiple databases at once for better performance. This tool is depend on mariadb-dump or mysqldump so make sure that you have one of these tools installed on your system.

Prerequisites

  • NodeJS 20.6 or later
  • mysqldump

Usage

Create .env file on root of project

DUMP_PROGRAM=mariadb-dump # Change to mysqldump if needed
DB_HOST=
DB_USER=
DB_PASSWORD=
DB_DATABASE=
DUMP_EXTRA_ARGS='--compress --skip-ssl --quick --single-transaction'

Run backup with env file

npm run backup

Run restore with default mysql

time mysql --user=<ADMIN_BACKUP> --password=<PASSWORD> demo < <(cat /path/to/your/restore/*.sql)

About

NodeJS wrapper for mysqldump for better performance

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published