2 Replies Latest reply on Mar 26, 2011 9:39 AM by Josh Nakatabe

    How to Synchronise Backups of Database and HornetQ Journals

    Josh Nakatabe Newbie

      Dear community,

       

      I'm pretty new to HornetQ, therefore my apologies if the question sounds too stupid.

       

      I'm wondering how I can achieve a synchronous backup of my database and my HornetQ journals. Image, I want to make a backup of my JBoss server application with all the content of the underlying database. However, I want to have a backup of my HornetQ journals as well. I'd think copying away the journals to somewhere would be sufficient, but ...

       

      Once I want to restore after my server's hard disk crashed completely, so I can only use my DB and HQ tape backup: how can I be sure that both backups are from the very same point in time? Or is there any other best practive approach I could follow for my backup strategies.

       

      Thanks in advance.

        • 1. How to Synchronise Backups of Database and HornetQ Journals
          rhinmass Newbie

          I'm also new, but I'll take a stab.  It seems like you might want to use global transactions so that you always update the database and message queue in the same transaction.

           

          How do you back up your database?  Do you lock it, so that the db backup is consistent with itself?  If so, can you copy the journals while the db is locked?

          • 2. Re: How to Synchronise Backups of Database and HornetQ Journals
            Josh Nakatabe Newbie

            Yes, I use global transactions. Once I recover DB and HornetQ journals, it is important that the set of existing messages exactly matches the states of the correspondent entities.

             

            And I don't understand what you mean with the DB backup being consistent with itself by lock. Doesn't it require a JBoss shutdown if I lock the underlying DB? I would rather like to do the backup while DB and application server keep running. It might become too much a down time if I shut down the server for every backup.