Oct 10 2007

Funny characters after restoring from a WordPress backup

Published by Jiwei at 9:26 pm under Software

I’m one of those paranoid who look into recovery even before starting. Apparently there are equally paranoid people in the blogosphere. Austin Matzko  wrote an excellent WordPress plug-in called WP-DB-Backup  (version 2.1.3). And it works like a charm, creating a SQL script that can recreate and restore my WordPress database.

However, after restoration, my posts are ornamented with a funny character like below.

This is an annoying  character with hex code “0xC2″ and it’s in the WP-DB-Backup generated SQL script.   I don’t know how it comes, but running the following filters out the “0xC2″ to “0×20″ (space).

% xxd blog_wp_20071009_910.sql | sed -e "s/c2 /20 /g"
  | sed -e "s/ c2/ 20/g" | xxd -r > new-db.sql

xxd is a little program provided by Vim. Re-run the SQL script  will clean up the old tables and populate the new ones.  

% mysql -u ID -pPassword blog < new-db.sql

where “blog” is my database name.

Related

The task of data recovery requires the availability of both the software and data recovery hardware. The latest versions of data recovery and backup software packages recover and restore the lost files and folders from a formatted or crashed hard drive. A data recovery utility is always running on a back up server in a data-sensitive where there is a heavy reliance on file sharing.

  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • YahooMyWeb
  • Technorati
  • Google Bookmarks

Related posts

One response so far

One Response to “Funny characters after restoring from a WordPress backup”

  1. Melinaon 21 Dec 2007 at 2:47 am

    very interesting. i’m adding in RSS Reader

    [Reply]

Trackback URI | Comments RSS

Leave a Reply

Spam protection by WP Captcha-Free