Hello, I have an old instance of OsTicket 1.6ST on a Windows server with IIS/PHP/MYSQL.

I would like to migrate the OsTicket 1.6ST to a new Windows server with IIS/PHP/MYSQL and uperade to the latest version.

I have successfully moved the ticket data and database to the new server and gone through the upgrade process by upgrading from OsTicket 1.6ST> OsTicket 1.8>OsTicket 1.12.

When I login to the upgraded ticket system I can see all the tickets present, but the existing attachments are no longer on the tickets.

The tickets setting is to save the tickets to the database and I can see in the table ost_ticket_attachment that the data is present.

How do I get the old ticket attachments to show up on the newly migrated & upgraded ticket system?

Thanks for your time.

UPDATE: The table ost_ticket_attachment is no longer present after the upgrade from 1.8 to 1.12.
Is it possible to for me to import the data in the ost_ticket_attachment table from a previous backup into the new attachment table?

1.6 attachments were not in the database.
They were moved into the database (I think in 1.8). The default is in the database.
If you want them on the filesystem you would install the storage::filesystem plugin.
Then you would need to migrate them out of the database.
If you do not have the tables where the files are stored: ost_attachment, ost_file, ost_file_chunk then it sounds like they never migrated into the database. So they would be sitting on the file system of the old instance. did you copy them over when you migrated?

Hello ntozier. Thanks for your reply.

You are correct, my bad. I have now located the folder where the attachments are stored for the 1.6ST instance I have running.

I am now struggling what process i need to follow in order initially migrate the 1.6ST instance to a new server along with the attachments.
This is what I have done so far.
1. Setup the IIS/MYSQL/PHP environment on the new server
2. Copy over the OsTicket directory from the old server to the new server.
3. Restoring the MYSQL database backup
4. Change the attachment location to the new file path.

Then I can browse and login to the ticket system and all the tickets are present. The attachments however do not load and present "no such file" error.

Is there anything i need to do to re-establish the link between the tickets and the attachments other than copy over the original attachments folder and point the ticket system attachment path the the new path?

Thanks for you time.

Ignore me. I have managed to get the attachments to link to each other now.

My apologies. I will give the storage plugin a go now.

Thanks,

Glad to hear that you got this sorted.

To migrate attachments you will need to export them from the D (database) to the F (filesystem) or viceversa depending on how you fixed your issue. You can run the command line

php setup/cli/manage.php file migrate --backend D --to F

To move from D to F. If you have a metric ton of attachments you might need to limit how many files it migrates. You can add a limit to the above command line by adding limit=100. Which of course means you would need to run it multiple times to complete the migration from filesystem to DB or viceversa.

php setup/cli/manage.php file migrate --backend D --to F limit=100

Write a Reply...