0.0
No commit activity in last 3 years
No release in over 3 years
`knife-mysql` contains a utilities working with your database nodes, such as copying databases from one node or environment to another.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

knife-mysql

Gem Version

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

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.

Contributing

Please do! Open a pull request with your changes and I'll be happy to review it.

License

Copyright (c) 2014 Logan Koester. Released under the MIT license. See LICENSE for details.