🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

mysql_backup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql_backup

bundlerRubyGems.org
Version
0.2.1
Version published
Maintainers
1
Created
Source

h1. mysql-backup

A command line tool that backups all MySQL database instances it can find a server.

h2. Installation


  $ sudo gem install mysql_backup —source http://gemcutter.org

You can also grab the source code and install with rake:


  $ cd /usr/local/src
  $ git clone git://github.com/christianhellsten/mysql-backup.git
  $ cd mysql-backup
  $ sudo rake install

h2. Configuration

Configuration is easy, just run the built-in mysql_backup_install command:


  $ sudo mysql_backup_install

The installation script will ask you to enter all necessary information and then writes the configuration to /etc/mysql_backup.

h2. Usage

Taking a backup of all databases is also easy:


  $ sudo mysql_backup

This will backup all databases, except the ones defined in the configuration file using the skip parameter.

h2. Scheduled backups with cron

Open the cron configuration with the following command:


$ sudo crontab -e

Add the following:


PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash

# m h  dom mon dow   command

# Backup all MySQL databases every night at 24:00

00 00 * * * mysql_backup

h2. Sample configuration


user: root
password: xxx
host: localhost
dir: /var/backup
format: %d-%m-%y
keep: 10

mysqldump:
  options: -Q -c -C --add-drop-table --add-locks --quick --lock-tables
  path:
skip: [mysql, test, information_schema]

h2. TODO

  • Refactor
  • List dependencies
  • Handle command line errors gracefully
  • Nice

h2. Author

"Christian Hellsten":http://christianhellsten.com ("Aktagon Ltd.":http://aktagon.com)

FAQs

Package last updated on 01 Nov 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts