i have installed plugin how do i migrate old attachments and move to a designated folder ?
attachments on file system
- Edited
- Best Answerset by KevinTheJedi
Some more help please do i perform this in cpanel using file explorer ?
I have managed to setup folder called fileattach now need to back up existing attachments in database and move to this folder ?
Looked at database on phpmyadmin found ost_file folder
need help to migrate from D to F
Believe this is command
php manage.php file migrate --backend D --to F
i got error when i carried this out.
- Edited
You don’t run that in the database, you run that on the command line on the server from within your osTicket directory. This is also assuming php
points to the appropriate PHP version.
Cheers.
How do i do this in terminal on pc, i have been using osticket for some years but not ever accessed command line
SSH to the webserver, find the appropriate path to PHP (you can google if you don’t know as it will be specific to your setup - on Linux you can typically run whereis php
and it will give you a path), cd
to your osTicket directory, and run the command you tried earlier after replacing php
with your PHP path.
Cheers.
Thanks will let you know how I get on
got ssh access and ran got here so far
-jailshell-4.2$ whereis php
php: /usr/bin/php /usr/lib64/php /usr/local/bin/php
-jailshell-4.2$
- Edited
I know this sounds silly but am still not sure what to do next ?
i cannot seem to browse to osticket folder
- Edited
i cannot see tickets folder as i can on ftp client
- Edited
It doesn’t appear to be hosted from public_html then. Maybe ask your hosting provider or site/server admin where the site files are hosted? I see you have CPanel, maybe try accessing the File Manager through CPanel and see what directory the site is hosted from and then use that path on the command line.
I’m sorry but I’m unfamiliar with your setup as it’s self-hosted so I can’t give you an exact path.
Cheers.
Looks like i am logging to other account will contact hostgator
So hostgator sorted out ssh on sub domain
see attachment
here is main directory
Great, now you can run the command I posted above to get more information on the migrate command:
To migrate from database to filesystem simply run:
php manage.php file migrate --bk=D --to=F --limit=200
You will need to run this quite a few times to migrate all the attachments. You do not want to run without a limit.
Cheers.