dump bigbrother.h2.db to mysql

Discussion in 'Bukkit Help' started by TNTUP, Sep 21, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    TNTUP

    Hi all, I know its weird to ask this but idk if anyone can help me with this, I want to bring back my olde data to mysql and then converting to logblock. I have switched to logblock because it was outdated and "sh*t". Merging this to logblock.

    I'm using Logblock and I want to merge old bb data to lb, Before switching to lb, my minecraft version was 1.0.1 and I have it running temporaily and I can see who edited blocks ingame, but there's no command to dump it into sql format for mysql, at this day I hadn't mysql installed but since 1.1 I'm using logblock and my host settled mysql user for me.

    tl;dr: I want to dump bigbrother.h2.db to mysql, converting bb to lb, then merging in current logblock database.

    I can lookup bb data ingame, but I can't read it with an external program.

    I'm using Logblock since 1.1

    PS: My english and grammar sucks. Sorry if I did errors. I'm french
     
  2. Offline

    JWhy

    Try to export a .sql with RazorSQL, just open the H2 db flatfile in it and export
     
  3. Offline

    TNTUP

    I tried, but I only see INFORMATION_SCHEMA and PUBLIC, I can't find any bb thing in. I'll try with razorSQL again.

    EDIT: I exported it, but the exported sql file is 261kb, but my bigbrother.h2.db is 167mb. I dont see any bbplayers, bbworlds... I think.
     
  4. Offline

    JWhy

    Sure you didn't miss a tickbox? :D
     
  5. Offline

    TNTUP

    hmh idk, I did DB Tools > Export Data [I select Multiple Tables, in Schema dropdown menu, I selected INFORMATION_SCHEMA, in Table Name, it was greyed because I selected multiple tables. Next, I clicked on "Select All" button and then Next, by default its selected to "SQL Statements, generate sql insert statements" Next, Export to single file, I selected <SEMICOLON> in SQL Statement Separator, Include Column names in export, fully qualify table names, escape single quotes. Then next, I save as export.sql, I see the filesize to 261kb. Did I forgot/enable/disable something? Thanks
     
  6. Offline

    JWhy

    Sorry, can't figure out, my RazorSQL trial expired and i'm too poor hehe.
    However it should work with this:
    • Copy/move your bigbrother .h2 file to C:\Users\YourName\ (Win 7) / C:\Documents and Settings\YourName (Win XP). For instance rename it to bigbrother.h2
    • Open "H2 Console" from "All programs". This will open a webinterface in your browser (http://127.0.0.1:8082).
    • There you change the JDBC URL to jdbc:h2:~/bigbrother (instead of jdbc:h2:~/test)
    • Type "SCRIPT" in the console and execute
    • Copy the content into a new .sql file
     
  7. Offline

    TNTUP

    okay I did what you said, but I get that thing:

    I need to paste it in SQL execution?
     
  8. Offline

    JWhy

    That's everything you get, when you type "SCRIPT" into the SQL box?
     
  9. Offline

    TNTUP

    Yes. just that.
     
  10. Offline

    JWhy

    And you configured the JDBC URL and have the file "bigbrother.h2" in your user directory?
     
  11. Offline

    TNTUP

    I used tthat jdbc:h2:C:\Users\TNTitsUP\Documents\CRAP\hi\bigbrother.h2.db, username sa and pass sa.
     
  12. Offline

    JWhy

    nonono
    Just make sure that file exists in your home folder and use jdbc:h2:~/bigbrother as JDBC URL... it's always choosing that path
     
  13. Offline

    TNTUP

    aah ok, I'll try that.

    EDIT: it gives the same result. I have copypasta the bigbrother.h2.db in program files, then export, same result. You think its impossible to export bigbrother database?
     
  14. Offline

    JWhy

    No i don't think it's impossible... did you rename it to bigbrother.h2?
     
  15. Offline

    TNTUP

    uhm, idk. anyway it would give the same result. I can test by renaming to bigbrother.h2 and it would prob give the same result. Gotta try that later. Thanks for your help though
     
Thread Status:
Not open for further replies.

Share This Page