How to take backup of osTicket Database

How to take backup of osTicket Database


osTicket is a widely-used and open source support ticket system. Follow the below steps to take MySQL backup (MySQL dump) of osTicket support ticket system.

1. Log into your Linux server as ‘root’ user or as any user with sudo privileges

2. Go to ‘include’ directory within osticket installation directory

Osticket configuration file

Osticket configuration file

3. If you don’t know your installation directory, search for ost-config.php file using find command.

root@osticket:/# find / -iname ost-config.php

4. Use less command to view the content of ost-config.php

root@osticket:/# less /var/www/osticket/include/ost-config.php

5. Note down DBHOST, DBNAME, DBUSER, DBPASS in ost-config.php file

# Database Options
# —————————————————
# Mysql Login info

6. Take osTicket MySQL database dump using MySQLdump command

# mysqldump -u osticket -p osticketdb > /usr/local/src/osticket.sql
Enter password:

7. Run the above mysqldump command and enter osticket database password

osTicket database dump will be saved in .sql format.