“Would you like to book a public speaker on ‘The Culture of Heart’ for your next event?”
Peter Falkenberg Brown specializes in inspirational talks, based on topics centered on the Culture of Heart.
“Peter Brown did an excellent job with the keynote speech.
This man is not only capable of speaking to a national audience
but he has ‘world-class’ ability in public speaking.”
Senator Larry Pressler, former US Senator from South Dakota
Visit our Public Speaking page and
Call 207.518.9004 or
Email peterbrown@worldcommunity.com
for availability and rates.

  
Updated: Feb 8, 2010



Navigation Top Page of Site Top Page of the
Significato Journal
About Us & Contact Us

The Last 20 Posts


Short Stories
The Orchid Queen by Peter Falkenberg Brown

From the Back Porch
My Alarm Clocks by Kimmy Sophia Brown

MusicViews
Maine Songbird, Heather Masse by Kimmy Sophia Brown

MusicViews
Divine Goddesses Bless Portland by Kimmy Sophia Brown

MusicViews
Portland Swoons Over Slambovian Invaders by Kimmy Sophia Brown

The Culture of Heart
The Value of One: Religious Freedom and the Growth of a Mystical World by Peter Falkenberg Brown

From the Back Porch
Let Them Eat Chicken Soup by Kimmy Sophia Brown

MusicViews
Katey Branch and Geoff Warner, Warm and Homey at the Blue by Kimmy Sophia Brown

MusicViews
Ron Cody, Erica Brown and Matt Shipman Deliver Sheer Joy by Kimmy Sophia Brown

MusicViews
Bill Evans and Megan Lynch Wow the Crowd by Kimmy Sophia Brown

Poetry & Verse
Short Waiter by Kimmy Sophia Brown

MusicViews
Bright Future for Seth Glier by Kimmy Sophia Brown

MusicViews
Bob Malone - Black Belt Piano Man by Kimmy Sophia Brown

MusicViews
Christine Lavin and Don White - An Evening of Harmony, Heart and Humor by Kimmy Sophia Brown

Poetry & Verse
On the sofa on a hot summer day by Kimmy Sophia Brown

Short Stories
The Child in the Forest by Peter Falkenberg Brown

MusicViews
Imperial Hot Club - Crowd Pleasing Gypsy Jazz by Kimmy Sophia Brown

MusicViews
Ramblin' Red - Wonderful Opening Act for VOCO by Kimmy Sophia Brown

MusicViews
Blown Away by VOCO by Kimmy Sophia Brown

From the Back Porch
Iris and the Twenty-One Duck Salute by Kimmy Sophia Brown

New Open Source
Software


MySQL Backup v3.3

Register Your Email
to Receive Journal Updates
Email Whitelist
Request Form

Columns The Culture of Heart From the Back Porch HeartQuestions MusicViews Letters from the Compassionate Pugilist
Literary & Educational Poetry & Lyrics Short Stories Plays Essays and Writings on a Spiritual Life
Public Policy Policy Issues White Papers & Issue Campaigns Off-Site Policy Papers
Things We Like Music We Love Books We Love: Non-Fiction Books We Love: Fiction Books We Love: Children's Favorite Quotes Interesting Things Art Gallery
Products & Services Public Speaking Column Syndication Publications, Books & Seminar Curricula True Love Thing to Do Abstinence Curriculum Free Software
Projects & Links Replace Property Tax Campaign Hawk Mountain Films Resource Catalogue
Make a Payment



Click on the PayPal buttons above to pay for WCP products or services with a Major Credit Card!
Top Page of Significato Journal
Note to our Open Source users: if you haven't taken a look at our new "Significato Journal", we invite you to do so! Click the link above or one of the links on the left.

MySQL Backup
NEW!: (September 14, 2008) - Version 3.3 fixes a critical ftp bug related to the usage of beginning and trailing slashes in the remote ftp directory variables. If you use the ftp function, you need this upgrade, otherwise the old backup files on your remote ftp drive may not get removed, thus filling up your drive.

| PageMod | MySQL Backup | FutureSQL | WCN:Talk (formerly FutureForum) |
| Search and Replace | Selected Backup | Simple Form |


[ Visit our Open Source Software page or one of the links above to obtain other Open Source programs ]

MySQL Backup is written in Perl. It uses mysqlshow to grab the database names and "show tables" to grab the table names for a user's account, and then uses mysqldump to save the data in a subdirectory named in the script. It then tars and gzips the files, using the date and time for the file name. It can be run from cron on a daily basis. It now removes old files and has an option to email the gzip file to an admin and/or ftp the files to a remote server. It also has options to use "select data into outfile" or a regular "select" for users who can't use mysqldump. (Some hosts don't allow that.)

New Features in 3.3:

  • Added code to make sure remote directory to delete ftp files matches setup variable for remote directory when using "pwd".

    If it doesn't match, the 'ls' command returns zero files, so the remote list of files never gets deleted. One doesn't want one's remote server to fill up!

    Ftp 'ls' requires the beginning slash to read the file list. If it doesn't have the beginning slash, it would assume the directory is a subdirectory of the current directory.

    'pwd' produces a trailing slash, so both slashes are required in the setup ftp directory variable.

  • Added code to remove '.' and '..' from remote ftp list of files.

New Features in 3.2:

  • Added code to not break if the remote ftp dir didn't have any files in it. Thanks to a number of users for pointing this out.

  • Added code to delete remote ftp files, based on the variable $number_of_files_to_save (see comments under variable, in set up section)

Version History - I've placed the complete Version History in a separate file due to size.

Note: If you're using Mysql-4.0.21, there's a bug with mysqldump.
- http://bugs.mysql.com/bug.php?id=4047
- http://bugs.mysql.com/bug.php?id=5538
Quote: "Workaround: do not use mysqldump with the -l option. Use the --single-transaction option. Actually, contrary to what is said in the manual, the -l option does NOT guarantee a consistent snapshot of all InnoDB tables is one database. You must use the --single-transaction option to get a consistent snapshot. The fix will appear in 4.0.22."

New Features in 3.0:

I've skipped from 2.7 to 3.0 because I consider this a major feature release . It has many, many improvements in the code, including:

  • options to refine the tar/gzip functions (-z switch, piped or two step method, intermediate text file deletion and support for bzip2);
  • mysqldump now uses --result-file (check your version of mysqldump!);
  • the script can now be run from the web, with password protection;
  • the script now works on both Linux and Windows (including email and ftp functions);
  • fixed a much requested bug with the parsing of whereis output;
  • added a significant amount of error checking;
  • cleaned up the reporting method;
  • rewrote the subroutine that deletes text files;
  • added a switch to disable reporting to stdout;
  • created a method for selecting method of output (screen, email or both) for all print commands;
  • many other small fixes and features. (see History Notes and comments in file).

Additional Features

  • saves backup files, then has option to email file and/or ftp file to remote server
  • supports large sets of databases and tables (tested with over 3,000 tables)
  • uses .cnf files, or user/password in the file, or web login
  • removes old files, based on time criteria
  • backup can be done with mysqldump, select into outfile, or sql select (some may not have permission for select into outfile, and some don't have access to mysqldump

Open Source Support Forum: This forum is now read only until I decide whether or not to make it password protected. There was too much spam.

Register your email to receive notification about updates to our Open Source software!
Current Version - 3.3
mysql_backup.cgi
(the primary script)
mysql_backup_login.cgi
(this login file is only necessary if you want to login via the web)



[ Quotes & Testimonials ]
MySQL Backup was featured as the
“Tool of the Month” for June, 2002
at UnixReview.com.

Peter,

I just wanted to say thanks for writing your sql backup script. We use it on all of our SQL servers here to make multiple backups per day, and have it tied into our tape backup libraries. Just wanted you to know we use it for thousands of databases multiple times per day, and your hard work is appreciated. Thanks,
Jordan

Jordan Lowe / Server Central Network

Dear Peter,

A while back you kindly advised me on the best way to restore my databases - your demo follows. Well, on Tuesday the worst did happen, and our server got hacked, losing the whole of MySQL and its records. But I had set up a cron job to run your backup script and email me the MySQL data file each day, and it has taken just a couple of hours to restore everything, entirely thanks to you! Thought you might like to know it is all worth while.

Very best regards,

Jeremy Rodwell
FlexiSites Ltd., England

[Note: Jeremy is referring to the text below about 'Restoring Many MySQLDump Text Files'. For all its impossibly arcane syntax, Unix really is powerful (once you figure it out :-). Thanks for the testimonial, Jeremy!!]

"In a word: awesome. This script (MYSQL Backup) lets me sleep at night while it makes precious backups of my data. Peter, thanks a million, the script is worth about that much!"
Ben Steed, Searcy, AR
"The MySQL Backup script has been my major back tool for our MySQL databases since day one. I think it is the best ever. If only we could do incremental back-up to save time and disk space..."
Ivan Mirisola, SysAdmin of Nucci Systems, São Paulo, SP, Brazil
"I think MySQL Backup is a powerfull and easy way to Backup MySQL Databases. Very Nice!"
Christian Weilacher, Germany

"You saved us reinventing the wheel with a few basic - but very effective - scripts. Thanks, probably some day, we can do something in return ..."
Thomas Weller, Manager La preveda, Germany

Note to Programmers:
If you're a programmer, and are interested in issues such as
'use strict', 'my' and other programming constructs, you may want to read
a note about my programming methods
.

[ Issues, FAQ's, ToDo and Version History ]
Importing (Restoring) Many MySQLDump Text Files:
~ from a user (paraphrased): "If we have 100+ mysqldump *.txt files, how can we easily import them all, in order to restore a database, without typing each file name in by hand? (i.e. from the shell prompt, piped to the mysql monitor:
mysql mydb < mytable.txt). Wouldn't it be better for the script to write all the tables to one text sql file?"

=> I suppose the script could be rewritten, but it's more flexible the way it is, considering that one can use the Linux shell prompt to do the same thing. Assuming that the database name is 'test', and that the files have the extension of '.txt', you can use this command:

find . -name "*.txt" -print | xargs -t --replace cat {} | mysql test

That parses through all the files and reads the contents using 'cat' and then pipes the contents one by one to the mysql monitor with the database 'test'. The '-t' shows you the file names as it works, so you're not staring at a blank screen. If you change the '-t' to a '-p', it will prompt you at each file. Try it on a test database first, to be safe :-) Note: I think the xargs version above is better than:

cat *.txt | mysql test

... because of the limitations of the command line size, assuming one has many files. Also, the xargs version shows you the filenames as they process. Of course, there are probably many other ways to accomplish the above, given the eclectic nature of Unix.

ToDo List
- a method to email each database to a different person

- a configuration option to allow running the script in
different subdirectories, with different config files, for different users, all using the same copy of the master script.
   

Return to Top Open Source Page

To receive email notifications of updates
to the Journal, please
sign up for our
Signifcato Newsletter.



News Flash!
"The True Love Thing to Do" Marriage Preparation, Abstinence & Character Education curriculum is available to translate into Chinese, Japanese, Spanish and many other languages. Please email Peter for details.



Drive Traffic to
Your Site!
Exchange Links with
us (Significato) in
Our Resource Catalogue!
[ Reprint Rights ]




The World Community Press does not have any control over the content of the ads below, and does not necessarily endorse each ad.

  General Content © 1980-2009 The World Community Press ~ All Rights Reserved Worldwide ~
All Other Writing Copyrighted by Individual Authors

[ Reprint Rights ]