mysqldump diff MySQL Differential Backup Shell Script

mysqldump diffmysqldump diff is a shell script that I wrote to take some of the pain out of differential MySQL backups.

Download mysqldump diff

After changing the appropriate values, this will dump your database daily and create a unified diff patch so you’ll only need to keep the original mysqldump intact and patch files describing the subsequent differences between each future dump. It is a simple form of version control for MySQL database dumps without the overhead of managed methods. Although results will differ based on on the frequency of record-modification and the interval between backups, using this method on weekly backups (over a 2-month period), my patches were each roughly a tenth of the size of the original dump and of course, the benefits are exponential as time goes on while allowing you to increase the frequency many-fold while still saving space.

Continue reading

Booking Management System Nearing Completion

I’m well over half-way with a huge project with tiny deadlines. I underestimated the amount of work that would be required as I designed and developer their latest eCommerce website but the business is being sold and the incoming owner wants a stream-lined platform for checking the availability of tours, booking them and managing payments from clients and to operators with different privilege roles, multiple integrated payment gateways and last but certainly not least, ignoring PEAR Mail to send with authentication (GMail, currently) and the wonderfully simple php-imap …as far as the MIME structure can be considered simple when jumping in head first to write an HTML/CSS/JS/PHP e-mail client from scratch with one e-mail address because used by multiple e-mail address yet still having their messages routed accordingly.

It took two sleepless nights but the back is broken so now it’s time to fix some little things, linking each tour to the original operator’s itinerary or scraping tour-availability so that the staff needn’t hop around between Microsoft Outlook®, Microsoft Word® and Microsoft Internet Explorer® which would negate their Windows lock-in and save them $820 per computer if they switched to Linux and used Chromium’s “Application Shortcut” (a modern Mozilla Prism) shown in the screenshots. Soon I can  get going on the design which I’ve been hanging out for!

ISO 3166-1 Country Codes MySQL Import Script

Probably like most, I’m sick of finding or formatting  country-code lists into an acceptable format for importing into MySQL for every single project that’s nationally-aware. This time around, I exported ISO 3166-1 as numeric, alpha-2 and alpha-3 with the corresponding country names. I only ever use the alpha-2 format but I thought I’d include the rest for anyone that might want them. The alpha-2 codes fit perfectly with famfamfam flag icon set thusly:

echo "<img src='/images/flags/".strtolower($country['alpha-2']).".png'>";

Download iso-3166-1.sql