Peter Olivia
02-07-05, 03:31 PM
I recently had to rebuild my Fedore Core 3 server and used the 2.x backup module from CVS. I had saved a backup to xml (as well as sql just in case) for restoring my DB once I finished rebuilding. Everything seemed to go just fine at the time of restore via xml. Over time I have found at least 2 probs that I was able to fix manually but I just wanted to see if it is a bug or an end user mess up.
By comparing sql to xml, I noticed the following:
1) All the sql INSERTs into sysvals for column sysval_value that had a \n got messed up. Values were missing due to the \n. If I recall correctly, the last entry in each cloumn was what was in the DB. The xml had each entry on a new line.
2) All the CREATE tables with float NOT NULL DEFAULT '0' became decimal (10,0). This essentially truncated all decimal portions of the restores INSERT entries. The xml for these entries had type="N".
Header section of the SQL and xml backups are identical to current settings: Orig:
# OS: Linux
# PHP version: 4.3.11
# MySQL version: 3.23.58
<?xml version="1.0"?>
<schema version="0.2">
Latest backup:
# OS: Linux
# PHP version: 4.3.11
# MySQL version: 3.23.58
<?xml version="1.0"?>
<schema version="0.2">
I also did a diff between my original backup module dir and the one I just installed and I could not find differences. Diff spit out that there were diffs, but an sdiff did not show code changes (just dos2unix issues)
I'll let the pros figure it out. BTW, thanks for this killer app.
By comparing sql to xml, I noticed the following:
1) All the sql INSERTs into sysvals for column sysval_value that had a \n got messed up. Values were missing due to the \n. If I recall correctly, the last entry in each cloumn was what was in the DB. The xml had each entry on a new line.
2) All the CREATE tables with float NOT NULL DEFAULT '0' became decimal (10,0). This essentially truncated all decimal portions of the restores INSERT entries. The xml for these entries had type="N".
Header section of the SQL and xml backups are identical to current settings: Orig:
# OS: Linux
# PHP version: 4.3.11
# MySQL version: 3.23.58
<?xml version="1.0"?>
<schema version="0.2">
Latest backup:
# OS: Linux
# PHP version: 4.3.11
# MySQL version: 3.23.58
<?xml version="1.0"?>
<schema version="0.2">
I also did a diff between my original backup module dir and the one I just installed and I could not find differences. Diff spit out that there were diffs, but an sdiff did not show code changes (just dos2unix issues)
I'll let the pros figure it out. BTW, thanks for this killer app.