m1mic's blog

Posted by m1mic

Objective:

  • Create a limited mySQL user account (e.g. Read-Only) to use in the batch file to follow the The Principle of Least Privilege methodology
  • Place multiple mySQL database backups in a specified folder
  • Add a timestamp to the mySQL dump file to easily distinguish between versions
  • Have multiple mySQL databases get backed up at a specified time

One of the "best" best practices is to backup any important data that you do not want to loose. This is especially important when you are storing a bunch of other people's data in a database. Problem is, if it is something that we have to think about, it just isn't going to happen. Luckily, all modern operating systems have the ability to run user generated scripts to help automate this task.

Posted by m1mic

For a recent web design that I was creating, I wanted to spice up the look and feel a little bit by having a silhouette background image. The site that I was working on is an information portal about working and jobs, so I wanted to have something that conveyed team work. Also, to speed up development time, I wanted to convert an existing photo into my silhouette. Enter Flickr Creative Commons search (part of their advanced search http://www.flickr.com/search/advanced/).

Why Creative Commons? Simply enough, because the copyright holder expressly sets the permission for what you can do with their work beforehand. I typically look for content that can be added to or enhanced by me (Creative Commons Remix) and content that can be used Commercially. After a little bit of searching, I found this photo:

Team Building by Flickr User a4gpa.  Accessed from flickr.com/photos/a4gpa/2312527906. Creative Commons Attribution-Share Alike 2.0 Generic License
Accessed from http://flickr.com/photos/a4gpa/2312527906 - Flickr Username: a4gpa.
Image is licensed under the Attribution-Share Alike 2.0 Generic license.
Posted by m1mic

Problem: Having a Drupal site automatically run the cron.php script and automatically backup a mySQL database at regular intervals on a Slicehost slice that is running Ubuntu.

Solution: Shell Scripting and Crontab

Turns out, this wasn't so much of a problem after all and it has a really straightforward solution. Since I am using Ubuntu, it already has cron functionality built into it. To tap into this functionality, it is as easy as editing a text file and telling the system to tun the tasks you want (including shell scripts).

MySQL cron backup step-by-step:

Posted by m1mic

FYI: I just reran the doxpara.com test using CableOne's DNS servers, and it appears to finally been updated. Thank you CableOne for being on top of this so I didn't have to run all over the valley this weekend updating routers to OpenDNS!

Posted by m1mic

Yesterday, I posted a tweet (http://twitter.com/ejhildreth/statuses/871831244) encouraging people that use CableOne as their Internet Service Provider (ISP) to run the free test at http://doxpara.com. Doxpara.com provides a Domain Name Server (DNS) tool that checks to see if your ISP's servers appear to be vulnerable to DNS Cache Poisoning (this allows the ability for somebody to impersonate any website). The test was created because there is an exploit out in the wild and *most* ISPs were still scrambling to get the hole patched.

Posted by m1mic

Kola Designs Background Image