4PSA – tbrestore from Total Backup for Plesk- phew


I bought the 4PSA Total Backup for Plesk some time ago for my Plesk server. Of course, 1 week before I was due to retire the server, it crashed. I had to reimage, and then came the nail biting task of restoring it.
But I had a few errors, I installed the correct version of Total Backup, but when I ran


I got the error


Error! Cannot cd to directory

‘Crap!’ I thought to myself. Googling didn’t help, nor did the 4PSA forums. Turns out the fix was that I had to specify a local backup directory through the Plesk control panel, for tbrestore to work.

It’s running now, it’s a slow, nail biting experience …..

Migrating from MySQL 4.1 to MySQL 4.0, fixing the missing AUTO_INCREMENT field error


After buying a 1and1 managed server, and signing up for two years, I discovered that even in the days of MySQL 5.0, these managed servers are set to use MySQL 4.0,
This sucks for alot of reasons, the main one being the pain in the arse it is to migrate other MySQL databases back to 4.0

After stuffing around at the command line using options like
mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` -p –skip-opt –create-options –compatible=mysql40 –add-drop-table –default-character-set=latin1 mydb > db.sql

It turns out that a bug in mysql4.1 screws up the creation of auto_increment when exporting with compatible=mysql40

Basically this means that if I export from mysql4.1 to mysql4.0, I have to manually add the AUTO_INCREMENT field type to each of the primary keys in the table. And since I’ve had alot of databases to move, each with up to 100 tables, I didn’t really fancy the idea.

So, after stuffing around I found a work around.

Export as normal from phpmyAdmin,

Do a find and replace on the SQL
And Replace With:

That is just delete all occurances of: DEFAULT CHARSET=latin1

And replace with: timestamp NOT NULL

This seems to do the trick

Worked for a Joomla on 4.1 to 4.0 database conversion
Worked for Zen Cart 1.2.6 to mysql 4.1 to 4.0
Worked for b2Evolution mysql 4.1 to 4.0 database conversion
Worked for Mambo 5 mysql 4.1 to 4.0 database conversion