WORKAROUND: Importing Unquoted TIMESTAMP Values
I love this plugin and have been using it on all my sites, but I just discovered a serious problem; however, I found a way to work around the problem and want to share it here so that others can benefit until the plugin can be fixed in a future release.
The problem is that the plugin does not enclose timestamp values in quotes when backing up the database. This causes a syntax error when importing the database from a backup file in phpMyAdmin. This means that the database cannot be restored directly from a backup file that is created by Version 2.2.4 of this plugin.
I successfully worked around this problem by doing a regular expression search and replace in a text editor to enclose all unquoted timestamp values in quotes. Since my database is over 50 MB in size, this required a text editor that can edit very large files. I wholeheartedly recommend PilotEdit Lite, which is totally free and fills the bill perfectly!
Unquoted timestamp values look like this in the database:
Here is a regular expression which finds unquoted timestamps:
Here is the PilotEdit Lite replacement expression to enclose the unquoted timestamp in single quotes:
I tested this on a large database with 100,345 occurrences of the search string, and it worked perfectly. After editing the backup file, I was able to import the database with no syntax errors whatsoever.
Not all WordPress sites store timestamp values; datetime values seem to be much more common, and this backup plugin handles those just fine. For sites which do have timestamp values, my workaround will help until the plugin can be fixed.
Thanks for all your hard work on a great backup plugin!
Thanks for posting this, the issue with unquoted timestamps will be fixed in the next release.
- The topic ‘WORKAROUND: Importing Unquoted TIMESTAMP Values’ is closed to new replies.