How to restore ISPConfig sql file

Discussion in 'Installation/Configuration' started by Shyciii, Jun 28, 2023.

  1. Shyciii

    Shyciii Member

    Hello. My server is end. I installed new server, and ISPConfig. I want restore ISPconfig config files, and sql backup. I try restore with phpmyadmin and cli (mysql -p dbispconfig < ispconfig_db_backup.sql), but geterror message: ERROR 1062 (23000) at line 50: Duplicate entry '1' for key 'PRIMARY'.
    How can restore ispconfig databases?
     
  2. Shyciii

    Shyciii Member

    Must be truncate all table
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Drop the dbispconfig database and then import the SQL file to a newly created dbispconfig that's empty. It will almost surely be partly broken though.
     
  4. Shyciii

    Shyciii Member

    Thx, but that is not good, because we also need empty tables, so an empty database is not enough. I just had to use the TRUNCATE command on all the tables and it was ready to be imported.
     

Share This Page