Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • How to Restore DB?

    Posted by vdelburgo on November 12, 2007 at 18:33

    Hello,

    I have a problem: I’m upgrading from 1.2 to 1.3 and when I go to step 4, appears the message:

    Schema manipulation (FAILS)
    Populating new schema and converting data (FAILS)
    Created new config file at ‘include/config.php’ (FAILS)

    There was some problems. Installation is not completed.

    Please correct failures, and restore original DB before trying again.
    ERROR: Duplicate entry ‘3’ for key 1.

    My question is, how can I restore the DB?

    Thanks and regards,

    VICTOR

    Sancho replied 17 years, 3 months ago 2 Members · 5 Replies
  • 5 Replies
  • Sancho

    Administrator
    November 13, 2007 at 03:34
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    I have a problem: I’m upgrading from 1.2 to 1.3 and when I go to step 4, appears the message:

    Schema manipulation (FAILS)
    Populating new schema and converting data (FAILS)
    Created new config file at ‘include/config.php’ (FAILS)

    There was some problems. Installation is not completed.

    Please correct failures, and restore original DB before trying again.
    ERROR: Duplicate entry ‘3’ for key 1.

    My question is, how can I restore the DB?

    Thanks and regards,

    VICTOR

    I hope you had followed the upgrade documentation at :

    http://www.openideas.info/wiki/index.php?title=Pandora_1.3:Documentation_en:Upgrading

    So, all you need is there, and I only could wish good luck 😉

  • vdelburgo

    Member
    November 13, 2007 at 13:23
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yes, I had followed the upgrade documentation… I execute the upgrade.php, but fails here:

    Schema manipulation (FAILS)
    Populating new schema and converting data (FAILS)
    Created new config file at ‘include/config.php’ (FAILS)

    There was some problems. Installation is not completed.

    Please correct failures, and restore original DB before trying again.
    ERROR: Duplicate entry ‘3’ for key 1.

    Now, I had restored the DB with ‘mysql pandora < pandora_1.2_backup.sql' but I don't know how to pass the 'schema manipulation' step and I don't know how to repair the error of 'duplicate entry…' Can you help me?

    Thanks

    Thanks

  • Sancho

    Administrator
    November 13, 2007 at 15:01
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yes, I had followed the upgrade documentation… I execute the upgrade.php, but fails here:

    Schema manipulation (FAILS)
    Populating new schema and converting data (FAILS)
    Created new config file at ‘include/config.php’ (FAILS)

    There was some problems. Installation is not completed.

    Please correct failures, and restore original DB before trying again.
    ERROR: Duplicate entry ‘3’ for key 1.

    Now, I had restored the DB with ‘mysql pandora < pandora_1.2_backup.sql' but I don't know how to pass the 'schema manipulation' step and I don't know how to repair the error of 'duplicate entry…' Can you help me?

    Thanks

    Thanks

    First at all, be sure that you have a recent MySQL dump of your database :-).

    If automatic upgrade fails, this is because any problem or inconsistency in your actual database. Dont worry, could be fixed. You will need to simulate the database upgrade step by step, to find the problem and fix it before making the automatic upgrade.

    Using a mysql console. In your pandora 1.3 console package, you will see a file called “pandoradbdata_12_to_13.sql”, open it in a text processor.

    Open a mySQL console on another window, with:

    mysql -u xxxx -pyyyy pandora

    Where xxx is the user used to manage pandora database, and yyy it’s password.

    Now just copy line by line from SQL code to Mysql console. You should find a line that fails. Then you will find the problem in your database. Now you’ve to follow several steps:

    a) Fix your database (you need to know some SQL to understand and fix the problem). Write the solution down in a paper or textfile.

    b) Rollback again your database with your data.

    c) Fix your database with solution finded in step (a).

    d) Execute upgrade tool. Now should work because database problem has been fixed.

    I hope this helps.

    If you cannot solve problem in step (a) because you don’t understand the SQL problem, please post here and I’ll try to help you.

  • vdelburgo

    Member
    November 13, 2007 at 18:23
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Thanks nil, now it works… another question: after the update, what have to do I? Have I to install any more?

    Thanks and regards,

    VICTOR

  • Sancho

    Administrator
    November 13, 2007 at 21:11
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Thanks nil, now it works… another question: after the update, what have to do I? Have I to install any more?

    Thanks and regards,

    VICTOR

    It’s done ! 🙂