Oct 10 2007
Funny characters after restoring from a WordPress backup
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.
Related Posts










very interesting. i’m adding in RSS Reader