Linux

Migrating my old mysql blog database to a new blog software (PluggedOut)

We updated my server from SuSE 9.3 to 10.1. php5 is the default on 10.1 and my blog software broke. As my blog software is not anymore maintained, I had to switch to another and I selected PluggedOut. The mysql database structures were quite different and this is what I did to do the conversion:

First I dumped the old database into textfiles:

mysqldump -u root -p --tab=/home/jeltsch/temp --fields-terminated-by=| --lines-terminated-by=# journal

Re-encoding mp3 files into smaller files with lame

My old mp3 player broke quite a while ago and now I am using a very primitive one that has only 128 MB and which refused to play some mp3s. In order to fit more podcasts into the memory and to play back those unplayable mp3 files I re-encode them with lame:
lame --mp3input -V 3 --strictly-enforce-ISO --resample 12 original.mp3 reencoded.mp3

Find and replace with perl

To replace the string jeltsch.blogspot.com by the string mnm.no-ip.com/blog you can use perl:perl -pi.bak -e 's|jeltsch.blogspot.com|mnm.no-ip.com\/blog|g' *.html If you want to do a recursive replacement on a directory tree you can try:perl -pi.bak -e 's|jeltsch.blogspot.com|mnm.no-ip.com\/blog|g' `find jeltsch.org -name '*.html'`

Pages