wow, seriously messed up my zenphoto install while troubleshooting. tried and installed a fresh version of 1.2.9, the version of zenphoto i created the backups with. then dropped all tables regarding zenphoto.
now, when i try to restore the backup from within zenphoto (after setup created all tables and i chose "restore db" instead of "create admin user"), it gives me this:
INSERT INTO zp_administrators (id,user,pass,name,email,rights,custom_data,valid,group) VALUES ("1","administrators",NULL,"group","","81790","Benutzer mit vollen Privilegien.","0","") ) fehlgeschlagen. Fehler: Duplicate entry '1' for key 1
any clues?
Upon further investigation:
… oh my god. I'm lost here.
The first error is somehow because there is already an entry in the Administrator's table for ID=1. I presume that is a bug somewhere but I am not sure what would cause it.
Did you get the same error when you attempted to restore a 1.3.1.2 DB on 1.3.1.2? I have not tried exactly that, but backup and restore definately are working for me with the current development build.
Update:
I have created a fresh install of v1.2.9. Did a backup and then a restore--no errors. Then I dropped all the tables, re-ran setup and clicked on the restore from DB link. The restore then also went without a hitch.
I then did an upgrade to versin 1.3.1.2 with no issues. Did a backup (to be on the save side) then restored from the backup done on v1.2.0. Again no issues. Then did a restore from the 1.3.1.2 backup with no issues.
Finally, I dropped the database tables and re-ran setup. Did a restore from the v1.3.1.2 backup without problems.
Summary: I have no clue as to what went wrong for you. What version of PHP and MySQL are you running?
Hey there again! I managed to delete the user which would cause the "Duplicate entry '1' for key 1" (the very first "administrator" in the backup file).
Now, the database backup runs "successful", though giving an error:
Warning: Invalid argument supplied for foreach() in /homepages/20/d250315487/htdocs/efes/zenphoto/zp-core/utilities/backup_restore.php on line 270
– i assume I have deleted to much from the backup?
Can you give me a hint in which format the backup is written? As in "how much values belong to a user" – so I can try and delete the right amount of data? I hope you can understand me :/
What I previously posted was done with v1.3.1.2; using v1.2.9 (under which the backup was created), the DB restore runs successfully (without any error messages). However, I end up with 10 of 500 users in the DB, no zen-pages, no comments … and so on. Investigating! (without knowing what I'm doing here