Giter Club home page Giter Club logo

mysql-dump-split's Introduction

What is it?

A simple script that splits a MySQL dump into lots of smaller files.

Usage:

First you need a mysqldump file, put it into the directory you want all the split files in:

$ ruby split-mysql-dump.rb db.sql
Found a new db: app
Found a new table: administrator_log
    writing line: 229 200.494MB in 4 seconds 50.124MB/sec

    Found a new table: auth_strings
        writing line: 239 205.482MB in 6 seconds 34.247MB/sec

Alternatively, you can pipe in via STDIN in using '-'. Great for working with large gzipped backups:

$ gunzip -c db.sql.gz | ruby split-mysql-dump.rb -

When you're done you should have lots of files like this:

-rw-r--r-- 1 rip rip   210233252 May 17 18:06 app_administrator_log.sql
-rw-r--r-- 1 rip rip   215463582 May 17 18:06 app_auth_strings.sql

The first bit of the files will be the database that the tables are in based on the USE statements in the dump.

Contact:

You can contact me on [email protected] or follow my blog at http://www.devco.net I am also on twitter as ripienaar

mysql-dump-split's People

Contributors

ripienaar avatar joemiller avatar

Stargazers

 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.