Automate your database backups using cron jobs in cpanel

February 22nd, 2008

I’ve been trying to do this off and on for years. Finally, finally I found the answer, and it is actually working! This is for people hosting with a service that uses Cpanel. Quick step by step:

  1. Log into cpanel and choose the MySQL Database link
  2. Create a database user named “backup” and add that user with full permissions to each database you have
  3. Go back to the cpanel home and choose the Cron jobs link
  4. If you want to run your backup at midnight every night, then choose the Advanced option
  5. Advanced: Leave all of the “Minute Hour Day Month Weekday” options at their default
  6. Standard: Use the form fields to choose how often you would like to run your backups, and at what time.
  7. BOTH: Paste the following line into the Command field (There are only two changes that need to be made to the line below: change DBPASSWORD to the database password you created for your MySQL user “backup” and change YOURACCOUNT to your account username)
    date=`date -I` ; mysqldump -ubackup -pPASSWORD -A | gzip > /home/YOURACCOUNT/xbackup_$date.sql.gz
  8. Click Commit changes and you are all done.

This should create a gzipped file in the root directory of your account named something like xbackup_2008-02-21.sql.gz. Now you can use something cool like FTP Synchronizer to create your own backups. More on that later.

Resizing Images in Paint Shop Pro

January 28th, 2008

A quick tutorial on the basics of resizing images in Paint Shop Pro for the web.

Joomla & JCE Editor Images and Advanced Image Features

January 27th, 2008

When using Joomla as your content editor, you may wish to use the JCE text editor as your editing tool. It has a lot of advanced features in the free version, but if you subscribe, you can also download some neat advanced plugins. I explore two of those plugins, JCE Image Manager Extended and JCE Captions in this video.