Rake task for backing up MySQL database

It is often a good idea to do backups, right? ActiveRecord doesn’t provide a straight task to do them, so I have written a small rake task to achieve that. This task automatically cleans up old backups. Additionally, it offers two additional variables to define max number of backups left and the directory name to [...]

Deleting duplicate records in MySQL

Sometimes you have multiple records where the same data spans across multiple columns in the table and you’d like to clean up that mess by leaving only one copy per unique set of records.

Grepping Oracle’s database dumps = awk hints.

I’ve just got a database dump from Oracle and I wanted to load it into mysql database. It turned out that it has a lot of Oracle specific things, so I decided to play a little with grep and awk to get the things I want.