Backing Up Radiant CMS using Sqlite3
April 28th, 2008
How to Transfer from SQLite to MySQL
I noticed something while working on a couple Radiant sites. I found that when I was building them locally, I prefer to work with SQLite3 databases. Then when I deploy them they use MySQL. Since so much of the configuration and site template lives in the database, I wanted an easy way to go from SQLite to MySQL. In the end I built it!
Wouldn’t it be Nice… to Backup from MySQL to SQLite? And vice-versa?
At the same time, I always thought it would be nice to be able to create a backup of the live database in SQLite. That way, if a client ever wanted their site ‘packaged up and portable’ as it were, it would be easy, just dump the production DB into a SQLite development DB, zip up the radiant folder and you have the whole site ready to run.
My ‘Plugin’ – Installation
I created this as a plugin for Radiant. Just download the package (at the end of this entry), uncompress into your plugins folder and you’re ready to go.
How to Use it
It’s fairly simple. Make sure you have SQLite and MySQL set up and running. Then configure your installation to use a SQLite DB for development and a MySQL DB for production.
development:
adapter: sqlite3
database: db/development.sqlite3
production:
adapter: mysql
database: myradiant_production
username: radixhound
password: paSSwerd
host: localhost
Then make sure your target DB is pre-created. So if you don’t have a production DB up to this point, you can do this.
rake db:migrate
rake db:migrate:extensions
Then when you want to transfer from development to production, you can do this…
rake db:backup:to_db TARGET_DB=production
To do the reverse, you will do this…
rake production db:backup:to_db
Or Backup to another SQLite DB altogether…
You can also configure a third, fourth or fifth DB in your database.yml file and use that to back-up to, in case you don’t want to wipe out your development DB. Just add something like this to your database.yml file…
backup:
adapter: sqlite3
database: db/development.sqlite3
Then you can do this..
rake production db:backup:to_db TARGET_DB=backup
Download the Goods
radiant_db_backup.zip
radiant_db_backup.tar.gz
PS: I also have a version that works for Mephisto sites. you only get it in zip format ‘cause I have somewhere to be right now.
PPS: I figured this out from someone else’s script that did something similar-ish but not quite this. I don’t remember who or what though, sorry.
30Boxes Calendar
September 19th, 2007
Calendar after the jump.
Read the rest of this entryLatest Versions for Rails at Hivelogic
August 13th, 2007
I just transferred over from a nice little Mac Mini to a Macbook Pro, and found that my Ruby on Rails installation is goooone. No problem! I’ll just re-install.
I’m following the instructions over at Hivelogic. The only problem with the instructions is that with the rapidly changing world of open source development, it’s bound to be out of date. So, since comments are closed on the article, I’ll just write my own entry with the latest versions as of today.
To get the latest versions, follow the instructions at Hivelogic and I’ll provide updated code to copy and paste only for the sections that have changed.
Read the rest of this entryMorning Martial Arts in Vancouver
July 11th, 2007
... or Burnaby
I love martial arts, and if I’m going to do something for exercise, nothing works as well to get me motivated to go and exercise. I just need to feel like I’m learning and growing and not just strengthening muscle group x and y. The thing about martial arts training is that it’s always offered in the evenings around dinner time or just after dinner. I don’t know how people with families can train at those times.
Wait. I bet they don’t.
... why not in the mornings?
I just don’t get this, really. It seems like a no-brainer that there would be some people interested in training in the morning before they start their day. Here’s what you do: you get up, go to your dojo or whatever, get the oxygen pumping, and start your day. This works for fitness classes. Why can I not find a single martial arts club in my area that has morning classes?
... are you up for it?
There can’t be that many people in the world that love their pillows so much that they are unwilling to get out of bed to start their day off with a bang. What do you think? If you had the opportunity, would you go for some early morning training?
I want to find a group of interested people and approach an instructor about starting some morning training. If you happen to be interested too and live in the Vancouver / Burnaby area… drop me a line! radixhound by way of gmail.com
CSS editing on Mac OS X just got better!
July 5th, 2007

For a while now, one of my indispensable tools for working with CSS has been Xyle scope
This application saves me so much time when it comes to editing CSS. I can immediately see the changes I’m making, I can tweak everything until I’m happy, and then save my changes. Often, I will try out different ideas and scrap them. I’ve been very happy using Xyle scope.
The one major gripe I’ve always had with it though, is that I could only edit CSS properties that were already there. If an element did not already have a margin property defined, then I would have to fire up my text editor and add that property before I could tweak it in Xyle scope. I lived with that because I was happy enough with the app otherwise.
I no longer have to live it! I’m thrilled with the new 1.2 version of Xyle (currently in beta). The developer has added a bunch of features that make it soooo much better. I’m loving it! Let me tell you about the new features that I’m loving. It’s kinda like a review, but not really.
Read the rest of this entryEnvy, Generosity and Canadian Idol
June 6th, 2007
I watched Canadian Idol last night. I hadn’t seen it since the first one in 2003 and I have to say I quite enjoyed watching it. This morning I found myself reflecting on the show and what I can learn from it.
The short version? Be grateful and generous and grab your truth strainer!
Read the rest of this entrySend More Toilet Paper!
May 14th, 2007
In working with non-technical people who are not familiar with all of the different acronyms and codes that are used in the technical world, it is a common challenge to be able to communicate on the most basic level. One example is in setting up email servers.
“In the outgoing mail server field, type in smtp.yourdomain.com.” “Type in what?” “Ess emm tee pee” “Ess emm pee tee?” “No, as in SEND MORE TOILET PAPER” “ohhh”
I’m going to propose the development of a standardized list of alternate, memorable, meanings of acronyms for the non-techie. Why should we explain to them that SMTP means “Simple Mail Transmision Protocol”? I mean, who really cares? Even half of the techie people would have to look it up.
If this development of a standardized list of alternate memorable meanings (SLAMM) takes off, then we can look forward to fewer typos when communicating techie. If you happen to stumble upon this blog entry in your travels, drop a comment and suggest a SLAMM for your most frustrating acronyms.
Here’s a start on suggestions.
- DNS : Drinking Numbs the Shenshes
- IMAP: I Make Armpit Poots
- SMTP: Send More Toilet Paper
I guess the usefulness of SLAMM will be limited to things that people have to communicate verbally. It’ll be fun to work on though, and useful to remind techies that they don’t have to explain the meanings of these cryptic concepts to people, they just have to pass on the data in a fun and friendly way so that they make their audience feel comfortable.
Weighing in on the iPhone
April 19th, 2007

I think the iPhone is going to stir up a revolution. Maybe it will just start a revolution—maybe it will be the revolution.
I keep reading about what people are saying about the iPhone and in a way I just want to laugh. The funniest thing to me is how many people get stuck in their boxed-in way of thinking. So many people in todays left-brained society are just unable to grasp things that are a whole new way of thinking or attacking a problem. Of course, when the idea has been around a few years, they’ll accept it and will quickly forget their old objections.
Here’s what I see happening with the iPhone—it’s going to be the only device you’ll need to take with you when you leave the house and it will revolutionize personal organization. Really, the music player is cool, but the time- and life-management options are the ones that are going to be really exciting!
Read the rest of this entryFast Food Websites
April 19th, 2007
Your website’s information should be the equivalent of fast food, but how good is that, really?
Let’s talk about food—fast food. Modern culture is in a love-hate relationship with fast food. We don’t have enough time to prepare slow and nutritious foods so we end up eating fast foods. The result is that our bodies crave the processed sugars. It gets to the point where we simply don’t consider healthy alternatives in our quest to find food.
I think it’s the same story with information. Just as hordes of people will file through a fast food restaurant for food while a select few will sit down at a restaurant serving healthy foods that involve serious chewing—hordes will visit websites with fast information and entertainment while few will visit and dwell at sites with deep and complex information.
It’s simply a fact that if you want a successful website you need to pre-process your content so it’s easy to chew and goes down easily. What I wonder about is how healthy that is for the future of our culture. I wonder if anything could be done to stop or slow that trend so that future generations dwell and deliberate more rather than flitting from idea to idea. It is something worth thinking about because a society full of soft and inactive bodies is one thing, but soft and mushy minds is another thing—a sad and frightening future.
Filters in Mephisto
April 9th, 2007

I just spent a bunch of time fiddling with what should have been a simple change to a filter plugin for Mephisto. It’s the Lightbox Filter. If I can save anyone else from this annoyance, this blog entry will be worth it!
Basically, all I wanted to do was to change the filter so that it generated the markup <div class="gallery"> instead of <div id="gallery">. Should be darned simple. So I went into the filter and changed one litter word. Great! I then spent far too long trying to figure out why that didn’t work. I could do nothing to coerce Mephisto to NOT generate the code the old way!!
Interested in Jewish History?
March 27th, 2007
Are you interested in Jewish History? You are! I have news for you then—there is a new museum that just opened in Vancouver.
I’m sure you are wondering why I’m plugging Jewish history. It’s because they have a cool new website that I implemented using Mephisto. If you are not in the Vancouver area, it might be difficult to pop on over to check out the museum, but you can still check out the website. Eventually they hope to have some of their archives online, but for now they just have an awesome publishing system that is clean and easy to use.
I’m particularly proud of the typography on this site. You may not notice right away, but the second column lines up very nicely with the first column. This can be a bit tricky when you include various sizes of text like the different sizes of headers. I just had to make sure the headers restored the vertical rhythm to normal by using appropriate top and bottom margins. I also created a little image with horizontal lines spaced 15px apart. This gave me a kind of ‘lined paper’ to work with so that I could conceptualize what was going on.
So, even if you aren’t interested in Jewish history, check out the cool site: Jewish Museum
Quicksilver Funny Moment
March 21st, 2007

I had this moment of absolute hilarity just a few minutes ago. I was playing with Quicksilver and tossing tasks into my inbox for Actiontastic, when I discovered that if I jump the gun and execute a command before giving an action to it, it would do the default action “Large Type”. Basically it just splashes the text on the screen. After a couple of fumbles, I thought I would mock myself for a moment. Little did I realize how well I would mock myself – or how much it would make me laugh. I still chuckle every time I look at the screen shot.
I just had to blog about this funny moment. At the same time, I’m going to explain how I took this screenshot, renamed it and converted it to 200×200 pixels in a few seconds and without touching my mouse! All thanks to Quicksilver.
Read the rest of this entryPodcast Test!
March 13th, 2007
I’m testing out podcasting with Mephisto. For the test, I grabbed a little sound clip of my daughter saying the Hail Mary prayer. She must have been about two and a half when I recorded this.
Boy did she ever have the cutest little voice!
Mephisto Recipe #1a - Auto Sections Revisited
March 13th, 2007
A few weeks back, I posted a Mephisto recipe for setting up a navbar using liquid that will automatically include all the sections in your site. It turns out that it wasn’t that good, so I’m revisiting the issue and posting a recipe that works. You can see it in action in my new section The Playground.
Read on to get the code.
Read the rest of this entryMephisto Tidbit #1 - Formatting Dates
March 1st, 2007
There may come a time with your Mephisto installation that you want to change the way that the dates are displayed on your blog. Or maybe you are a designer working on an ultra-cool template that needs a funky date format. This is how you work with date formats.
Standard Date Format with Simpla
The default Simpla theme for Mephisto (the one my blog is using currently) displays the date using the mdy format like so:
<h3>{{ article.published_at | format_date: 'mdy', true }}</h3>
So what if you want to use a different format? What do you use instead of mdy? If you are adventurous, peer into the file mephisto_init.rb in the lib directory.
