bithaolee / database-backup

Automatically Schedule Database Backup to Local Dist and Amazon S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically Schedule Database Backup to Local Disk and S3

Pre requisite

  • mysqldump

Installation

copy .env.sample .env
copy .db.ini.sample .db.ini
pnpm install

Commanders

List the latest n database backups

./index.js backup -d [dbName]
./index.js backup -d [dbName] -n 20

Create a database backup

./index.js backup create
或者
chmod a+x ./backup
./backup.sh

Deploy to Crontab

0 12 * * * /path/to/backup.sh
0 0 * * * /path/to/backup.sh

About

Automatically Schedule Database Backup to Local Dist and Amazon S3


Languages

Language:JavaScript 98.3%Language:Shell 1.7%