J
jaredfine
Guest
After a days worth of frustrations I finally figured out why my backup didn't fully restore my databases correctly. Namely my MySQL databases were all missing their auto_increment settings. At first I thought this was a Plesk problem though I soon found out that its only partially Plesk's fault. When pleskbackup (current and presumably earlier versions) runs it dumps the MySQL user databases with the following command:
/usr/bin/mysqldump -h 'localhost' -u 'admin' -p'****' -P '3306' --quick --quote-names --add-drop-table --compatible=mysql323 --default-character-set=utf8 --set-charset 'db_name'
The primary problem with this command is due to the way MySQL versions <= 4.1.20 RHEL4 or <= 5.0.22 RHEL5 handle the --compatible=mysql323. Apparently this was a heavily debated bug (which at one time was actually considered a feature!) in which the compatible flag did not output auto_increment definitions in the table creation sql although those versions of MySQL always supported that feature. Please see the URL below for full details:
http://bugs.mysql.com/bug.php?id=14515
I had never experienced this problem because I only recently upgraded to RHEL4 and all my backups from RHEL3 came over fine. It wasn't until I tried a full backup and restore that I ran into this. I consider this a fairly serious problem that many people should be aware of due to the popularity of RHEL and frankly I'm upset that SWSoft hasn't done a better job documenting this problem even if it isn't directly their fault.
My hope is that SWSoft can add additional features to the backup/restore utilities so that a user can override these settings. Frankly I'd be fine if the backup files required they be restored on a current or newer version of Plesk, MySQL, Postgresql, OS, etc if it meant more reliable backups. In the meantime I will create my own separate db backups and will tar /var just to be double safe. I encourage those of you like myself running on effected versions to do similar to fully protect your data.
/usr/bin/mysqldump -h 'localhost' -u 'admin' -p'****' -P '3306' --quick --quote-names --add-drop-table --compatible=mysql323 --default-character-set=utf8 --set-charset 'db_name'
The primary problem with this command is due to the way MySQL versions <= 4.1.20 RHEL4 or <= 5.0.22 RHEL5 handle the --compatible=mysql323. Apparently this was a heavily debated bug (which at one time was actually considered a feature!) in which the compatible flag did not output auto_increment definitions in the table creation sql although those versions of MySQL always supported that feature. Please see the URL below for full details:
http://bugs.mysql.com/bug.php?id=14515
I had never experienced this problem because I only recently upgraded to RHEL4 and all my backups from RHEL3 came over fine. It wasn't until I tried a full backup and restore that I ran into this. I consider this a fairly serious problem that many people should be aware of due to the popularity of RHEL and frankly I'm upset that SWSoft hasn't done a better job documenting this problem even if it isn't directly their fault.
My hope is that SWSoft can add additional features to the backup/restore utilities so that a user can override these settings. Frankly I'd be fine if the backup files required they be restored on a current or newer version of Plesk, MySQL, Postgresql, OS, etc if it meant more reliable backups. In the meantime I will create my own separate db backups and will tar /var just to be double safe. I encourage those of you like myself running on effected versions to do similar to fully protect your data.