Navigation

    ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Make an osTicket Database Backup

    IT Discussion
    backup database mariadb mysql mysqldump osticket rdbms
    4
    8
    1004
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmiller
      scottalanmiller last edited by

      osTicket uses MariaDB (or MySQL) as its database. Taking a database backup is quick and easy and totally standard to the MariaDB platform. But for those not familiar, this command will take care of you.

      mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql
      

      In this example you will need to add your database credentials, of course. And it only takes the backup to the /tmp directory. So either use that as a temporary scratch space before shipping the backup elsewhere, or change the target location.

      dbeato 1 Reply Last reply Reply Quote 1
      • dbeato
        dbeato @scottalanmiller last edited by

        @scottalanmiller said in Make an osTicket Database Backup:

        osTicket uses MariaDB (or MySQL) as its database. Taking a database backup is quick and easy and totally standard to the MariaDB platform. But for those not familiar, this command will take care of you.

        mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql
        

        In this example you will need to add your database credentials, of course. And it only takes the backup to the /tmp directory. So either use that as a temporary scratch space before shipping the backup elsewhere, or change the target location.

        I have never used OST Ticket but is those single transaction and other database commands necessary rather than normal mysqldump ?

        JaredBusch 1 Reply Last reply Reply Quote 0
        • JaredBusch
          JaredBusch @dbeato last edited by

          @dbeato said in Make an osTicket Database Backup:

          @scottalanmiller said in Make an osTicket Database Backup:

          osTicket uses MariaDB (or MySQL) as its database. Taking a database backup is quick and easy and totally standard to the MariaDB platform. But for those not familiar, this command will take care of you.

          mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql
          

          In this example you will need to add your database credentials, of course. And it only takes the backup to the /tmp directory. So either use that as a temporary scratch space before shipping the backup elsewhere, or change the target location.

          I have never used OST Ticket but is those single transaction and other database commands necessary rather than normal mysqldump ?

          Umm, that is a normal command. What is the problem here.

          dbeato 1 Reply Last reply Reply Quote 0
          • dbeato
            dbeato @JaredBusch last edited by

            @JaredBusch said in Make an osTicket Database Backup:

            @dbeato said in Make an osTicket Database Backup:

            @scottalanmiller said in Make an osTicket Database Backup:

            osTicket uses MariaDB (or MySQL) as its database. Taking a database backup is quick and easy and totally standard to the MariaDB platform. But for those not familiar, this command will take care of you.

            mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql
            

            In this example you will need to add your database credentials, of course. And it only takes the backup to the /tmp directory. So either use that as a temporary scratch space before shipping the backup elsewhere, or change the target location.

            I have never used OST Ticket but is those single transaction and other database commands necessary rather than normal mysqldump ?

            Umm, that is a normal command. What is the problem here.

            I am terrible at explaining, but specifically, what I was trying to ask is what is the difference between running a mysqldump without any flags besides the username password and mysql host if neccessary. I am more talking about this part:

            --single-transaction --quick --lock-tables=false
            
            scottalanmiller 1 Reply Last reply Reply Quote 0
            • scottalanmiller
              scottalanmiller @dbeato last edited by

              @dbeato said in Make an osTicket Database Backup:

              @JaredBusch said in Make an osTicket Database Backup:

              @dbeato said in Make an osTicket Database Backup:

              @scottalanmiller said in Make an osTicket Database Backup:

              osTicket uses MariaDB (or MySQL) as its database. Taking a database backup is quick and easy and totally standard to the MariaDB platform. But for those not familiar, this command will take care of you.

              mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql
              

              In this example you will need to add your database credentials, of course. And it only takes the backup to the /tmp directory. So either use that as a temporary scratch space before shipping the backup elsewhere, or change the target location.

              I have never used OST Ticket but is those single transaction and other database commands necessary rather than normal mysqldump ?

              Umm, that is a normal command. What is the problem here.

              I am terrible at explaining, but specifically, what I was trying to ask is what is the difference between running a mysqldump without any flags besides the username password and mysql host if neccessary. I am more talking about this part:

              --single-transaction --quick --lock-tables=false
              

              The single transaction flag initiates a MySQL transaction which makes it more efficient because it does not lock the entire database.

              1 Reply Last reply Reply Quote 1
              • scottalanmiller
                scottalanmiller last edited by

                osTicket uses InnoDB, so this is the command for that. If we were using MyISAM, we'd not want this command.

                1 Reply Last reply Reply Quote 2
                • Dashrender
                  Dashrender last edited by

                  Total DB Admin noob here - so bare with me.

                  Does this include the username/password setup for this DB? or does that need to be maintained separately?

                  i.e. you have to rebuild from this backup - do you just create a brand new SQL user and grant them rights to this DB upon import, then use that new account to give access to the app?

                  In typing out my question I kinda assume the answer is the second bit - you just create a new user and assign them rights.

                  JaredBusch 1 Reply Last reply Reply Quote 0
                  • JaredBusch
                    JaredBusch @Dashrender last edited by

                    @Dashrender said in Make an osTicket Database Backup:

                    Total DB Admin noob here - so bare with me.

                    Does this include the username/password setup for this DB? or does that need to be maintained separately?

                    i.e. you have to rebuild from this backup - do you just create a brand new SQL user and grant them rights to this DB upon import, then use that new account to give access to the app?

                    In typing out my question I kinda assume the answer is the second bit - you just create a new user and assign them rights.

                    Correct. The user and the database are separate things.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post