A Basic Database and Content Backup Script

I presented an unconference session at the great WordCamp Portland and have cleaned up my backup script for WordPress (and really any db/single uploading/plugin/theme folder program). Comment here if you have any questions about how it works or suggestions for how to improve it. Like WordPress, it’s available under the GPL v2
[bash]#! /bin/sh

# config
DBPASSWORD=’password’
DBTABLE=’DB’
DBUSER=’user’
CONTENTPATH=’path/to/wp-content’
DESTINATION=’/destination/for/backups/’
# end config

DATE=`date +%Y.%m.%d.%k.%m | tr " " _`
echo
echo Licensed under the GPL version 2 http://www.gnu.org/licenses/gpl-2.0.html
echo Copyright 2009 Aaron Jorbin http://aaron.jorb.in
echo
echo $DATE start backup with mysqldump
mysqldump $DBTABLE –add-drop-table -h localhost -u $DBUSER –password=$DBPASSWORD –single-transaction > db.$DATE
echo mysqldump done, gziping it
tar cfz db.$DATE.tar.gz db.$DATE
rm db.$DATE
echo Database backup gzipped, Tarring up our WordPress folder
tar cfz mu.$DATE.tar.gz -C / $CONTENTPATH
echo copying files to backup folder
mv db.$DATE.tar.gz $DESTINATION/
mv mu.$DATE.tar.gz $DESTINATION/
echo Cleaning Up
#clean up files that are sitting there
find $DESTINATION -type f -mtime +14 -exec rm {} \;
echo Thank you for backing up WordPress.
echo —
echo The Poetic Code
echo Options, Comments, Posts and more
echo Safer then before[/bash]

Detour Cafe

Detour Cafe is a fabulous (I recommend The Boys Upstairs which is a sandwich featuring Italian sausage with roasted onions, melted mozzarella and tomato sauce) cafe in South East Portland that I had the honor of collaborating once again with Emily Steen from Built Studios on for their website. They already had a basic site, but it was slow and hard to update (since it relied on a lot of flash).

Emily designed a few enhancements to the sites usability and I rebuilt the site from scratch to use WordPress to allow them to make all the changes to update the site easily and often. I provided all the coding outside of the site header and trained Becky, one of the Cafe owners, on how to use WordPress.

Built-Studios

This site was a lot of fun.  I worked with Emily Steen, the Principal of Built Studios, to build a site that allows them to easily update the site with all the work they do and

This site features a custom built WordPress theme that makes use of the Jquery UI for both the side navigation and the image switcher on client pages.  Check out this page to see the image switcher in action.

Since launching the site, we have added the news feed to the front page to make it easier for them to show off the newest things worked on.

Valls Photographic

I worked with Valls Photographic on two great sites. The first is Vallsphotographic.com/wordpress and it is Wedding and Wedding Photography blog. While I’m not getting married anytime soon, I’ve stayed subscribed to this blog for it’s great Photographs. I got this site back up and running after an SQL injection attack and upgraded it and it’s security.

The second site I did for Valls Photographic is Johnvalls.com/wordpress, a comercial photography blog. I designed this blog to be clean and fit in with the overall theme of Johnvalls.com.