Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Importing .sql dump into new OSticket instance

Hi All,

I have been setting up a new Centos server to run osticket v1.7.

I have the system up and running, but now could use assistance importing my old osticket settings to the new server, without using phpmyadmin. Here is what I have done so far.

I performed an export of my current osticket (V1.6) mysql database, and used WINSCP to upload this .sql file to a new directory /sqldump. I want to populate the "support" database I created prior to the install.

I then ran this command to populate the new blank database with the .sql file

#mysql -u -p -h localhost support < /sqldump/mysql.sql

# service mysqld restart

Now when I look at the "support" database, I can see all of the tables imported successfully.

My question now is, how do I get the osticket application to recognize this new information? My new installation does not show these migrated tickets in webbrowser.

Any thoughts would be helpful! Thanks.

Comments

  • - Upload osTicket 1.7.1 to your webserver.
    - Copy ost-sampleconfig.php to ost-config.php in your include/ folder.
    - Edit ost-config.php and set DBHOST, DBNAME, DBUSER, DBPASS to the hostname, database-name, username, and password of your mysql server
    - Visit the osTicket installation in your web browser, you should be presented with the upgrader, which will migrate your data to the osTicket 1.7.1 schema
  • ost-config.php

    Thank you for your reply.

    DBHOST, DBNAME, DBUSER, DBPASS are all configured, and I believe they are correct. Here is what it looks like.

    #Mysql Login info
    define('DBTYPE','mysql');
    define('DBHOST','localhost');
    define('DBNAME','support');
    define('DBUSER','root');
    define('DBPASS','');


    Then I ran:
    #service mysql restart

    However, when I browse back to my new OSTicket instance, it only shows 1 ticket, and no additional staff members or depts.

    More thoughts please? Thanks!!
  • Database Error

    Update on this issue. I ran a "use support" command, worked fine. Database changed.

    Then I ran:

    mysql> source /sqldump/dwise2_ostt1.sql
    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.01 sec)

    ERROR 1054 (42S22): Unknown column 'isonline' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'can_append_signature' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry 'support@d-wise.com' for key 'email'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'cfg_id' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'dept_access' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '7' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'append_signature' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '338' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '603' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1095' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1599' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    ERROR 1054 (42S22): Unknown column 'topic' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1054 (42S22): Unknown column 'file_size' in 'field list'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '138' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '305' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '482' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '675' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1013' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '955' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1082' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1195' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1274' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1352' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '324' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '561' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '820' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1070' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '208' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '468' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '722' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '933' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1105' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1258' for key 'PRIMARY'
    ERROR 1062 (23000): Duplicate entry '1409' for key 'PRIMARY'
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)

    Query OK, 0 rows affected (0.00 sec)


    This is all very cryptic to me. Can somebody give me some advice? Basic basic basic! Thanks.
  • Looks like you either have a bad database dump, or you have existing data in the `support` database. I would recommend dropping the `support` database before loading the sql backup file. If you're not comfortable dropping it, create a new database and use it to load the data into:

    create database `support-recovered`;
    use `support-recovered`;

    source '/path/to/backup.sql';

    Then change the ost-config.php to point to the recovered database.
Sign In or Register to comment.