A Node.js module to automate MySQL database backups on configurable intervals using cron syntax. Version 2.x uses node-cron and requires SendGrid for email notifications. It automatically purges old backups to manage disk space. The package is tightly coupled to SendGrid (no other email providers) and mysql (mysqldump). Last updated in 2020; no recent activity.
npm install cron-mysql-backupNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes cron-mysql-backup to backup a MySQL database every hour, with email notifications via SendGrid.
Ensure you call cronMysqlBackup(options) after import.
Provide all required options.
Obtain a SendGrid API key or fork the package to use other providers.
Install MySQL client tools on the machine.
Run 'npm install cron-mysql-backup' and ensure node_modules contains the package.
Use 'const cronMysqlBackup = require('cron-mysql-backup')' and then call it as cronMysqlBackup(options).Ensure MySQL is running on localhost:3306 and credentials are correct.