Coder Social home page Coder Social logo

mysql-backup's Introduction

MySQL Backup

A Node.js script to backup MySQL databases to Amazon S3. Note - this script spawns mysqldump so it needs to exist in the path local to where you are running this program.

Getting Started

  • Clone this repo: git clone https://github.com/stvmlbrn/mysql-backup.git && cd mysql-backup
  • Run npm install
  • The script uses dotenv to access environment variables. You'll need to manually created the .env file and add the required variables.

Required environment variables

  • DB_HOST = Host name or IP address of the database server
  • DB_USER = Username used to connect to the server
  • DB_PASS = Password used to connect to the server
  • S3_ACCESS_KEY = Your AWS access key
  • S3_SECRET_KEY = Your AWS secret key
  • S3_BUCKET = Name of the bucket you are uploading to
  • BACKUP_PATH = Path to the directory where the files will be backed up before uploading to S3.

Optional environment variables

  • CRONALARM_KEY = The API key for CronAlarm. If you do not want to integrate with CronAlarm you can run the script with the -nomonitor parameter.

mysql-backup's People

Contributors

stvmlbrn avatar

Stargazers

 avatar youngcyber avatar Damian Tardencilla avatar Ross Chiu avatar Raed avatar Sirwan Afifi avatar Alexander Radyushin avatar Teodor Dermendjiev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.