@ryanburnette/mysql-dump-s3-sync

2.0.0 • Public • Published

mysql-dump-s3-sync

repo npm

Dump a MySQL database and sync the backup to AWS S3.

Usage

npm install @ryanburnette/mysql-dump-s3-sync

Always configure AWS using the environment.

All other options can be configured in the environment or as an opts object passed to backup().

# .env

# Configure DB explicitly... or
DB_HOST=
DB_PORT=
DB_NAME=
DB_USER=
DB_PASS=

# Configure DB by URL
DB_URL=

# AWS
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET=

# Other options
LOGGING=

Run a backup.

npx backup

Make it a scheduled service.

// service.js
require('@ryanburnette/mysql-dump-s3-sync/cron')({
  schedule: '0 0 * * *'
});

First, install go-serviceman so we can add services in the easiest possible way.

sudo serviceman add --system --path $PATH node service.js

Readme

Keywords

none

Package Sidebar

Install

npm i @ryanburnette/mysql-dump-s3-sync

Weekly Downloads

7

Version

2.0.0

License

ISC

Unpacked Size

7.52 kB

Total Files

10

Last publish

Collaborators

  • ryanburnette