This is a short and sweet tech tip. If you have binary data, such as images or zip files, stored in a mysql database, this technique will export those blobs (binary large objects) back to the file system. Case: Bugzilla attachments exist in mysql that now must be exported to another bug tracking system. Approach: Run this query select thedata from attachments where bug_id=‘224’ and mimetype not like ‘text/plain’ and mimetype not like ‘text/hmtl’ into dumpfile ‘/data/bug-224-attachment.zip’; for each bug that contains a binary attachment.
Recently, an upgrade of the OS on the commavee server resulted in the blog post URLs failure to resolve. Earlier blog posts, with the date-and-post title formatted URL, were now unresolvable. This meant that every post in the search engines (and even the site itself) resulted in a 404 Not found error. It took a bit of investigation, but the solution was straight-forward.
If you are writing automation in Perl (very common), you will certainly need to interact with the system. You have multiple ways to implement system interaction in Perl; one of the most efficient & effective methods is use of the system function.
Today’s Tech Tip deals with performing fully automated (unattended) backups of a MySQL database from one system to another, even though there is no direct connectivity between the two systems.
This is a new feature that I hope you enjoy – Tech Tip of the Day. With a technology background that dates back to just *before* the introduction of the IBM PC, I have had the pleasure of working with some cool, world-changing systems, software, and gear as both my business computing career and the Business Computing Industry have grown up together.
Everyone has been bitten at least once over the years when a critical system crashes… and you have no backup. Since I run a production site used by thousands of people across the globe daily, being unprepared like that is simply not an option for me.