I tried to upgrade 3.1.4 to 4.5.3. The upgrade failed (choked on schema updates)

Error while running '/opt/zimbra/bin/mysql --user=zimbra --password=SAoo20h4bjrUQusGVKJZ5cQJ8C --database=zimbra --batch --skip-column-names'. at /opt/zimbra/libexec/scripts/Migrate.pm line 220, line 94.
Tue Mar 6 11:40:50 2007: Script failed with code 1 - exiting

So I tried to upgrade 3.1.4 over the half-installed 4.5.3, that failed, so I have to clean install 3.1.4. Done, moved on.

Now my problems are much worse. Before doing all this I took a backup, of course. But now I can't restore from the backup. When I run 'zmrestoreldap -lb xxxxxxx' I get:

bdb_db_open: database already in use
backend_startup_one: bi_db_open failed! (-1)
slap_startup failed

When I run 'zmrestoreoffline -a all' I get:
Error occurred: no such domain: avvenu.com

If I reinstall and configure with the avvenu.com domain, then I get the same error, but I'm missing corp.avvenu.com.

Everything worked fine in my staging runs