Code Monkey home page Code Monkey logo

mysqlsuperdump's Introduction

MySQL Super Dump

Once uppon a time there was a development team that liked to use dumps from the production database in their development environments to have the same content and behavior of the production system in their machines.

To avoid security problems, the system administrator created a script to dump the production database, import in a temporary database, then replace all sensitive data, like salts, passwords, customer names, emails, etc, for fake data, then export a dump of this temporary database to a file that is the dump developers would use.

However this script was taking more time to run, day by day, and each day it was using more resources from the server to run, until it exploded.

This is a fictionary tale based on a true story, but it can happen with lots of development teams over the world.

Based on this I've decided to make a program to solve this problem. The first version was made in Python 2.7 in a few hours, but I got trapped in text encoding problems of Python and MySQLdb library. So I've decided to rewrite it using Go (golang).

Usage

  • Clone the repository.
  • Download Go 1.0.3 or newer from http://golang.org, and install it. Remember to set your $PATH env var.
  • Build mysqlduperdump running "sudo go get && sudo go install" inside the project directory.
  • Create a mysqlsuperdump.cfg config file and place where you like it. Use the included. mysqlsuperdump.cfg as an example of setup.
  • Run mysqlsuperdump -h to see command line options and voilá.

mysqlsuperdump's People

Contributors

hgfischer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.