How To Backup osTicket?

A friend of mine is using osTicket for his small support team and was wondering how he could backup osTicket. I did some online search and expected to find thousands of threads and hundreds of scripts.

Lot’s of people suggested to use mysqldump and backup your webserver but I couldn’t find a quick an easy script, which would help my friend.

I create a basic bash script which you can add to a cronjob to make sure it will regularly backup your system.


 The following of the script needs to be modified with your settings:

The backup.log is very easy to ready and a successful backup will look like this:

How to restore from my backups?

  1. Untar backup file
    1. tar -zxvf backup_file.tar
  2. Restore your DB_file.dump
    1. mysql -u root -p[root_password] database_name < DB_file.dump
  3. Restore your ost-config.php
    1. cp ost-config.php /srv/www/htdocs/include/ (or to wherever osTicket is installed)

Refresh your browser and you should be able to see all your restored data.

If you have any feature requests or bugs, please do not hesitate yo reach out to me. My contact details are in the script header.


3 Comments|Add your own comment below

    1. Hey Gregg, you can run this script from any machine which has access to the osTicket DB and web directory. Just make sure you adjust the config in the script.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.