Skip to content

Instantly share code, notes, and snippets.

@fs-c

fs-c/osticket_steps.md

Last active Dec 22, 2017
Embed
What would you like to do?

Key

Server A will be the machine that is being migrated from, with server B being the target machine. The same scheme applies to database (DB) A and B.

Steps

I would like to encourage you to use a search engine of your choice to attempt and resolve any issues that may arise - you will find that there are more than enough guides, tutorials and articles on virtually any problem you may face.

  1. Export database A and move it to server B.

    You would for example use scp to move the copy, and mysqldump to export the database.

    $ mysqldump -u root -p osticket_db > ~/dump.sql
    $ scp ~/dump.sql root@serverB:~/dump.sql
    
  2. Move the OSTicket folder from server A to server B.

    To stick with the toolset, you could use scp again, this time moving a whole folder and all it's subfolders using the -r option.

    $ scp -r /path/to/your/folder/osticket/* root@serverB:~/where/you/want/it/to/be/
    

    Note that you will most likely find your osticket folder in /var/www/html or just /var/www/. Running a default configured Apache on Ubuntu LTS you would want the folder to be in /var/www/html/, on your new server.

  3. Create DB B on server B, and import DB A.

    To create a new DB you would use the CREATE DATABASE name; MySQL query, which you can invoke from the MySQL command line - to enter which you will have to simply do mysql -u root -p.

    Importing database A can be done with

    $ mysql -u root -p osticket_database < ~/dump.sql
    
  4. Adjust configuration of the imported OSTicket install.

    Since, on server B, the database will most likely have a different name, user, and password, you will have to manually edit the includes/ost-config.php file.

    Assuming you are in the root directory of your OSTicket install, open a text editor with

    $ nano includes/ost-config.php
    

    And edit the lines relevant to MySQL. You can read more on editing with nano here.

  5. Copy OSTicket 1.10 over the files now on server B.

    Since we have now completely migrated OSTicket from server A to server B, it is time to upgrade versions. Now would also be a good idea to check if everything works.

    Assuming the new version of OSTicket lies in ~/osticket/ , you would simply do

    $ mv -f -r ~/osticket/* /var/www/html/osticket/
    
  6. Running the upgrader.

    This is an automatic process that should begin once you navigate to http://yourip/support/scp.

Congratulations! If everything went well, you just migrated and upgraded OSTicket! If not.. well, sucks to be you, I guess. Feel free to drop me any questions, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.