Skip to content

Perform a MySQL database backup every X seconds and upload it to amazon s3.

License

Notifications You must be signed in to change notification settings

Upplication/mysql-s3-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#mysql-s3-backup

mysql-s3-backup allows you to perform a backup of your database and store it in an Amazon S3 bucket.

Installation

git clone https://github.com/mvader/mysql-s3-backup
cd mysql-s3-backup
cp config.sample.json config.json

Now you must edit the config.json file to configure the backups.

Configuration

  • accessKeyId: Amazon s3 access key.
  • secretAccessKey: Amazon s3 access secret.
  • region: S3 bucket region.
  • dbUser: database user.
  • dbHost: database host, localhost by default.
  • dbPort: database port, 3306 by default.
  • dbName: database name.
  • dbPassword: database password.
  • interval: number of seconds between backups.
  • bucket: bucket where the backups will be stored.
  • keyPrefix: prefix for the amazon file name.
  • overrideCommand: if your mysqldump is not accessible through console as 'mysqldump ...' change it for its location. Example: MAMP has the mysqldump binary in /Applications/MAMP/Library/bin/mysqldump and it's not in the path.

Running mysql-s3-backup

Just:

node index.js

You can also run it with forever.

npm install -g forever
forever start index.js

About

Perform a MySQL database backup every X seconds and upload it to amazon s3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%