Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

knife-mysql Knife Plugin

knife-mysql is a knife plugin for working with MySQL databases on servers managed by Chef.

Install & Usage Instructions

Installation

gem install knife-mysql

Usage

scp

knife mysql scp SOURCE DESTINATION (options)

The knife mysql scp subcommand makes it easy to copy databases between nodes.

This task will ssh to each node matching the source query and mysqldump the requested databases to a SQL file,
then download the resulting file to your local machine, and then upload it to each node matching the destination query, finally importing the data to mysql and
cleaning up all the files.

Examples

Copying a single database from one node to another.

$ knife mysql scp name:db1.example.com name:db2.example.com --databases db_example

Copying everything from your production database servers into a staging environment.

$ knife mysql scp "role:database AND chef_environment:production" "role:database AND chef_environment:staging"

See knife mysql scp --help for the full list of options.