Announcement

Collapse
No announcement yet.

Recover from backup derby files?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recover from backup derby files?

    In installing 1.8 RC I couldn't log in. Eventually, had to uninstall all, and reinstall, copying the program filesMirth to /program files/MirthBack. I now have a clean, running 1.8.
    Unfortunately, all of the channels that I had developed were in the old setup and, of course, not in the new. And no import/exports. And I'm on the road. (everyone shakes their head and says how glad they are that they aren't this stupid).
    Is there a way to extract the information from
    /program files/Mirthback/mirthdb/mirthdb.bak0 ?
    I can connect to it using if, but not sure what to do next to retrieve/transfer to
    program files/Mirth/mirthdb
    Any direction would be appreciated.
    Doug

    Post edited by: dugjohnson, at: 10/20/2008 08:14

  • #2
    Re:Recover from backup derby files?

    There are a few ways to go about this. All of them weird.

    1. Change the conf/derby-SqlMapConfig.properties file to point to your backup DB, restart Mirth, and export all of your channels. This may not work since you had a broken Mirth install on that DB.

    2. Grab a Derby database client, http://db.apache.org/derby/integrate/index.html . Use it to open your backup database, select the channel XML from the channel table, save it to a file, and then import that file.

    If you can post more information (errors, etc.) from your broken install we may be able to simply fix that. Don't forget to use the code tags to make those messages easier for us to read.

    What Mirth version(s) are involved here? 1.7.x? 1.8?

    As long as you preserve a copy of your backup database your data will be safe, it may just take some work to get it out.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:Recover from backup derby files?

      Error on install was (to the effect of)
      Code:
      Cannot restore from /mirthdb/mirthdb.bak0
      Moving from version 1.7.1.3422 to first 1.8 RC and then 1.8 RC2.

      There appears to be data in
      Code:
      /mirthdb/mirthdb.bak0/seg0
      although the first try (changing properties to point to the backup data) didn't work.

      On to the second try.

      Thanks for the information.

      Comment


      • #4
        Re:Recover from backup derby files?

        What was your error when trying to log in? If it was something about mismatched versions, you could probably use that install, clear your java web start cache, and try to webstart again.
        Jacob Brauer
        Director, Software Development
        NextGen Healthcare

        sigpic

        Comment


        • #5
          Re:Recover from backup derby files?

          Using ij I can "see" the data using

          select * from channel

          Any suggestion on how to get that to a file?

          Comment


          • #6
            Re:Recover from backup derby files?

            Original error was being unable to copy the database.
            Then, when going into the administrator, the login didn't work.
            For better or worse, I am beyond being able to reload data, as I did an uninstall and a reinstall, being left only with the mirthdb.bak0 files at this point.

            I can see the data there, so all is not "lost". However, I am unfamiliar with A) the database/table structure internal to Mirth and B) derby as a database. On the up side, I am fine with SQL in general, and am just trying to find the syntax to work with derby.

            Is there a way in derby to import into the main database tables from the backup tables, and which tables would be needed? (I need channels, transforms, and connectors and destinations...there are no pre or post processing scripts, nor any filters)

            Comment


            • #7
              Re:Recover from backup derby files?

              I've now gotten in with Squirrel SQL and managed to do a data export. Of course, the lines are too long in the channel export to run the import. But moving forward.

              Comment


              • #8
                Re:Recover from backup derby files?

                Final solution was both weird and potentially ugly, but I share it here, and let the administrators delete it if it seems appropriate.

                I shutdown the Mirth server.
                I copied the mirthdb directory to a "safe place".
                I then copied the seg0 directory from my backup over the seg0 directory in the main mirthdb database.
                I started Mirth server and went into Administrator.
                All was back as it should be.

                Comment


                • #9
                  Re:Recover from backup derby files?

                  Its an acceptable hotfix for the issues you had.

                  Now that you have access again I would export all of your channels and then do a clean install of Mirth and reimport them to get your system back into a consistent state.

                  Thanks for posting as you worked through this. It may indicate a kink in the 1.8 install process and it certainly provides a good starting point for other uses who may run into similar situations.

                  Most importantly, its an example of why you should ALWAYS make a backup of your channels.
                  Jon Bartels

                  Zen is hiring!!!!
                  http://consultzen.com/careers/
                  Talented healthcare IT professionals wanted. Engineers to sales to management.
                  Good benefits, great working environment, genuinely interesting work.

                  Comment


                  • #10
                    Re:Recover from backup derby files?

                    That was my thought exactly. And, for better or worse, I have now duplicated the problem (this time with a good backup).
                    I uninstalled everything, then installed version 1.7.1.3422. In trying to run it, loading plugins stayed up forever, and it never went into administrator.
                    Thinking that perhaps I had upgraded something in the previous 1.8.0 install that was keeping 1.7 from running, I reinstalled 1.8.1 RC2. NOW when I go to login, admin/admin is no longer accepted, with an error message, "There was a problem authenticating the information" (etc).
                    Another reinstall of 1.8.0 produced the "could not copy from mirthdb.bak0 error, and did not fix the inability to log in.
                    I am now going to remove Mirth, and then install 1.8.0 from scratch.

                    Comment


                    • #11
                      Re:Recover from backup derby files?

                      This was a bug in the installer. I've committed a fix and it will be available in RC3.
                      Gerald Bortis | Chief Information Officer | Mirth Corporation

                      Comment


                      • #12
                        Re:Recover from backup derby files?

                        And this time, when I uninstalled it, I also renamed the Mirth directory to another name so that it was a completely new install.
                        This time it came up and asked me to register, and then went in just fine.
                        I'm guessing it's this registration process that may be making the difference, since I don't recall being asked about this before.
                        But I'm up and running, I believe. Now to reconfirm everything is working correctly for my connectathon.

                        Comment

                        Working...
                        X