Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

niwo/mysqlmb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL-Maintenance-Buddy

MySQL-Maintenance-Buddy is a application which handles MySQL database backups
and database optimization for daily maintenance.

Copyright © 2009, Nik Wolfgramm

Features

  • create MySQL backups using mysqldump for all or some databases
  • restore databases from backups
  • optimize database tables using mysqlcheck
  • delete old database backups based on retention time
  • show current databases and backups
  • collect some maintenance stats such as duration of maitenance and number of db’s backed up
  • send a maintenance summary by email
  • log actions to logfile

See mysqlmb.rb —usage for a full list of options

Usage

Launch the ruby script:
mysqlmb COMMAND [options]

See mysqlmb -? for usage.

Requirements

List of dependencies:

  • Ruby
  • MySQL tools (mysql, mysqldump, mysqlcheck)
  • command line with some standard utilities (echo, bzip2)

Installation

  • Download mysqlmb and move it to the desired application directory (i.e. /usr/local/mysqlmb)
  • Create a symlink in order to have mysqlmb in your execution path
    • ln -s /usr/local/mysqlmb/mysqlmb /usr/local/sbin/mysqlmb
  • Have a mysql user with backup/optimization rights available
    • Minimal rights for backups: SELECT, RELOAD
    • for optimizations: LOCK TABLES
    • example user creation with mysql cmd-tool: GRANT SELECT, RELOAD, LOCK TABLES ON *.* TO backup@localhost IDENTIFIED BY 'password';
  • start automating MySQL maintenance tasks using MySQL-Maintenance-Buddy!

About

MySQL Maintenance Buddy is a ruby command line application for automated MySQL backups, restores and daily maintenance jobs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages