Splash of Style...Macs, Photography, Design, and other Passions

Cron Jobs & Backing Up Database Data

June 7, 2006 by debbie T | Content ManagementLinux CornerWeb Development

I have been backing up my mySQL databases manually through phpMyAdmin, and although it is an simple, straightforward way to backup, I really wanted to find a more reliable, automated backup system for my database data.

After a remind on an email list, I decided to learn a little more about Cron Jobs. First I googled “cron job backup database” and found an interesting script for backing up WordPress.

WordPress backup with Cron

From that page, I also found a more robust MySQL backup script:

AutoMySQLBackup from SourceForge.net

I read the basic instructions, then downloaded the .sh file. I thought the file was fairly easy to configure; make sure to scroll down the page for detailed instructions.

It looked like a simple enough process, but I did have a little trouble. My Notes:

* I uploaded the .sh file in a new directory above my public web files. Important! Make sure that you do not upload this file to your public_html directory, as it is possible that the file could be accessed there.
* I changed the .sh file permissions to 755.
* I created a new directory where the backed up database files will be saved. Make sure that the directory is referenced correctly in the .sh file. This is where I kept having trouble, so I finally set an absolute path to the backup directory.
BACKUPDIR="/home/username/backup"
* Set permissions to 755 for backup directory.
* I checked in my /etc directory, and did not find a daily cron folder, so I experimented with my own cron job. In my hosting account’s cpanel, at the bottom category “Advanced Tools”, choose Cron Jobs.
* Choose the “Standard” button for a wizard-like set-up.
* Type in a valid email address. If there is an error in the script, it is very helpful to receive an email notice.
* Type the path to the .sh file in the “Command to run” text box.
./directory/automysqlbackup.sh.2.5 – change directory to your specific name. Also, make sure to include the exact file name. If you are using a version of the script different than “2.5″ you must reference the specific file name, or rename the file to “automysqlbackup.sh”
* To test the script, I suggest a temporary setting of every 5 or 10 minutes. It will keep running while you troubleshoot the errors. Once the script runs successfully, remember to change the setting back to “0″
cron-job
* Once you receive an email showing the completed process, open the backup directory. There should be newly created directories for daily, weekly and monthly. Inside the daily directory, look for individual database sub-folders, with compressed .sql files.
* Regularly download the database compressed files. I plan on downloading my weekly files.
* If it is ever needed, the .sh file also includes instructions for restoring your database.

This looks like a really useful script, and it will make my backups so much simpler and less time consuming!

Update: This morning, I received an email letting me know that the 3AM backup was successful; I checked the backup folder on my hosting account, and found a backup file for Thursday.

Updated My WordPress Theme

May 30, 2006 by debbie T | WordPress

When I initially started Splash of Style, WordPress only utilized one template – the index.php file. When WordPress 1.5 was released, a new template theme system was offered, which gave WordPress so much more versatility.

When I upgraded the site to version 1.5, I kept using one template file; I was still fairly new to WordPress, and I didn’t want to mess up the site.

Since I now have a lot more experience with WordPress themes, today I decided to be brave and convert the site over to the new theme system. It was a little messy at first, with a few php errors, and missing images. But eventually, it came together. I even experimented a little with a custom search page.

If anyone notices anything funky or out of sorts, PLEASE contact me. I tried to look at every possible scenario on the site, but I am sure there is something I missed.

WordPress Akismet Spam Control

May 18, 2006 by debbie T | WordPress

My blog is not the most popular web site by any means, but I still get my share of comment spam. Fortunately, I don’t have to deal with tedious chore of manually deleting any unwanted comments, I leave that to the handy dandy Akismet plugin.

I have been using Akismet for many months, and it is effortless. There is nothing to do but…

* Sign up for a wordpress.com blog account
* Download, upload & activate the plugin file
* Copy the API key into your Akismet configuration.
* Sit back, relax, and watch the blocked spam counter raise higher and higher

Simple but very capable. I don’t think there is a more effective comment spam blocker for WordPress or for that matter, any other blogging CMS software.

RSS Feed Change

April 1, 2006 by debbie T | InternetWordPress

By popular demand, actually my friend Miraz requested it, I have change the RSS feed to display each article in full, as opposed to just a summary.

Please let me know if anyone experiences any feed difficulties after the change!

For those using WordPress, you can adjust your own RSS feed in Admin>Options>Reading>Syndication Feeds. There are settings for how many articles and if a summary or full text should be available in the feed.

WordPress Dashboard Plugin

March 18, 2006 by debbie T | WordPress

The WordPress Dashboard page sometimes irritates me; some of the extra content slows down the page, but the page cannot be customized by default.

But I found a neat plug-in called X-Dashboard that will allow some customization to the Dashboard. I want to display my drafts, recent articles and comments, but remove the extra WordPress news; The plug-in isn’t perfect, but it works pretty good for me.

Blogossary

February 19, 2006 by debbie T | Content Management

So you are a blogger, but do you know what meme is? Or how about blawg, blogfolio or link love?

Wonder no more, because the Blogossary is here!

WordPress 2.0.1 Observations

February 5, 2006 by debbie T | WordPress

Now that I have been using WordPress 2.0 for a few days, I wanted to jot down some observations…good and bad.

I like the right side expandable link menus. Leave a menu open, it stays open until you close it, even if you close your browser window and start anew the next day. What I don’t like it how small the category menu is. I don’t like scrolling to view all my categories; I liked it when they were all viewable on the page. What is cool is the ability to add new categories on the fly.

The time stamp messed up on me yesterday when I published an article I saved as draft. Somehow, it published as the day before. It could have been an isolated incident, but I will watch for the problem again.

When saving as draft, the preview area (below) is now displayed using your current CSS/theme. That is really wonderful!

For Splash of Style, I am using the old method of templates in WordPress. I guess you could call it the ‘non-themed’ template design. I still have my design coded in the index.php file, not as a separate theme in the themes folder. For another one of my blogs, I do use the themes, so I know how they work. I think I am a little nervous to transfer to themes for this site, but I suppose the worst case scenario is that visitors would view my site as the default theme for a few hours (or days) until I figure out the bugs. It might be worth it to me to transfer, just because I don’t know how long this old method will be supported.

I am not a fan of the WYSIWYG editor in WordPress 2 yet, but I think I will eventually get used to it. Especially since there is the ability to now insert your own html code (in code view). I haven’t tested it extensively, but what I saw, it works well.

I also really love that the WYSIWYG text editing area can be manually resized. How awesome is that!?

Funny, I have had a love/hate relationship with WordPress over the years (read some of my older articles on WP,) but it is fast becoming my favorite blog/CMS program. I used to feel Expression Engine was my favorite, but while I was posting an article using EE this weekend, the editor felt clunky. Way to go WordPress!

WordPress vs Textpattern AGAIN!

February 5, 2006 by debbie T | TextpatternWordPress

I had full intentions of using Textpattern as the CMS software choice for a site I am redesigning. I tried over and over to get motivated to learn the Textpattern template and forms system, but I kept falling short. I was procrastinating more than I usually do, and I felt guilty. The web site should have been up weeks ago, but I just wasn’t feeling the spark to learn Textpattern. It was beginning to feel like too much work to mold it to fit my needs.

I wanted easy to edit templates that I could maintain off site with my own code editor. I figured that maybe using php includes would be the answer, but it just seemed like too much work, and I was still researching and finding myself no closer to finishing.

I admitted my doubts to a friend the other day, and I came to the realization that I like to learn new things, but sometimes, I just want to relax and enjoy what I already know. I think I am starting to show my age. LOL

I really hate giving up, but I just don’t think Textpattern is going to work out for this particular website, even though I had such high hopes.

So, I have now begun my trek into learning more about WordPress. It’s an easy journey, since I am already comfortable with the admin area, and I love that the template tags are php based.

The reason for not initially considering WP for this project was because I felt it it didn’t offer the customization I needed. I now realize that I can have one template for my main page, and a second template for single article pages. In fact, templates can be created for various sections of a site, if needed.

I also came to the conclusion that Pages (not posts) are the answer I was needed for a custom Table of Contents. Links to Pages can be sorted by the numerical value you assign. I am also intrigued with sub-pages.

The only drawback is that every time a Page is created, the .htaccess file must be edited. I have two choices, I can change the permissions to my .htaccess file to allow WP to write changes, or I can edit the .htaccess file myself each time. But other than that, I feel like WP will be a great choice for my redesign.

Similar to how I feel about Mac OS X, working in WordPress just feels natural. Big thanks to my friend Lisa from Cafe Lisa for all her advice and help.

WordPress 2.0 WYSIWYG Editor

February 1, 2006 by debbie T | WordPress

Hmm, well, I already disabled the Rich Text Editor (WYSIWYG) for now. It was taking too long to load (and reload after a quick save,) and I wasn’t sure I liked the way it double-spaced when I hit enter once.

I did like the “insert link” and I loved the option to resize the text window. I also found the view html button intriguing, and I wonder if I can insert my own html. I will have to explore the editor further later, but for now, I will keep it disabled.

Updating Splash of Style to WordPress 2.0

February 1, 2006 by debbie T | WordPress

Going to finally upgrade to WordPress 2.0 tonight. FINALLY! I have the site files backed up, along with the database. Fingers crossed it all works!

See you on the other side folks!

UPDATE: I think the upgrade to 2.0 went well. I had to update my Subscribe to Comments plugin – the new one looks very good, with a few new features.

So far, WordPress 2.0 is a little different, and I will have to get used to the WYSIWYG editor. So far, I see some really great potential here, and I think I will love the new version. WordPress has definitely been my favorite blog software lately. But more on that on a separate article later.

Oh I do want to reference the 2.0 Plugin Compatibility page. I want to really dig in and check some of these plugins more closely.