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

    Make an osTicket Database Backup

    IT Discussion
    osticket backup mysql mariadb mysqldump database rdbms
    4
    8
    2.5k
    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.
    • S
      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.

      D 1 Reply Last reply Reply Quote 1
      • D
        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 ?

        J 1 Reply Last reply Reply Quote 0
        • J
          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.

          D 1 Reply Last reply Reply Quote 0
          • D
            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
            
            S 1 Reply Last reply Reply Quote 0
            • S
              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
              • S
                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
                • D
                  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.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    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
                    • 1 / 1
                    • First post
                      Last post