http://Check-these.info/MiniSqlDump.html


MiniSQLdump is a minuscule dump/restore utility for MySQL.

It's a small (nearly pure) shellscript offering both Web interface and command line capability.

So, you can use it in crontab or in other scripts, and aslo backup/restore via browser.

Installation:

If you have or install extratools automatic installer, just click on Install/Update minisqldump.cgi.
(This is the recommended method for novice users.)

No editing is required (unless you want to use default parameter feature).
Just upload/copy the file as minisqldump.cgi in a well protected directory and set permission to 700 (using WebFTP/site tool...), and it's ready to go.

Features:

It keeps table creation SQL command and data in separate files.
You can specify to put all files in a zip, tar, tgz (tar.gz), tbz2 (tar.bz2) format.

Moreover, it doesn't convert the character code (mysqldump does it, normally), so it's more efficient.
I've made a companion restore script for 'mysqldump' and a few other scripts, but this one is the easiest and fastest.

Also, it can restore from 'mysqldump' generated backup, as well as create backup using 'mysqldump'

I've done lots of testing, and it is working well, so far, but it is still under testing.
So, plese keep a copy of backup with 'mysqldump', just in case.

Limitation:

You cannot use special characters in parameters with Web interface.
Allowed chars: 0-9 a-z A-Z - _ .
In File/path: / (and %, when 'date' command integration is done)
With command line interface, there is no limitation imposed by this script.

Future plan:

Download Link

http://check-these.info/tools/minisqldump_cgi.txt


I've written many small scripts in the past (other than real programs),

but this one is by far the most favorit one.

It consists of three major parts, backup/restore/main.

The main part takes care of CGI GET & POST input handling
as well as command line, in a very crude (but functional) way.

Backup/restore parts have compress/extract routine for zip/tar/gz/bz2
and table creation SQL command generation/parsing
in addition to the dump/load data code.

This script uses many of shellscript tips I learned in the past, and it's useful, flexible, and small.

I cheated a bit using 'cut' and 'sed', but I'll probably replace them with shell function, later.

Also, I'll add better option handling using getopt or while+case loop. ... Done.


Questionable color of this page is dictated by blueberry cream cake, my favorite dessert.

This page is http://Check-these.info/MiniSqlDump.html

My main site is hosted by PowWeb, one of the best low budget host !

12,000 MB + 10 Gigs/Day Transfer - $7.77/mo Web Hosting!
Last modified: 2005-11-20_03:22:21   Powered by Wikiciter CMS