Hello,
I'm using version 1.0.6
upload method is 'DATABASE'.
I would like to change my attachment upload from DATABASE to DISK method. Because I want to minimize my Database space and for backup reasons.
But if I change this, am I still be able to access my already uploaded attachments?
Better is to move the attachments in the DATABASE to DISK. But how do I do this?
I tried to use the system utilities option 'Move Attachments to DISK', but this gives me an Error: "Failure: Upload Method is not DISK".
Does anyone has a solution for me?
Thanks in advance.
Marnix
Change upload from database to DISK
Moderators: Developer, Contributor
Re: Change upload from database to DISK
HI,
you need to first set in your config_inc file the storage method with this :
$g_file_upload_method = DISK;
And the run the script utility
Regards
Dom75
you need to first set in your config_inc file the storage method with this :
$g_file_upload_method = DISK;
And the run the script utility
Regards
Dom75
Re: Change upload from database to DISK
Sorry. How You do this? Where you find this?mpa wrote:I tried to use the system utilities option 'Move Attachments to DISK', but this gives me an Error: "Failure: Upload Method is not DISK".
Marnix
Re: Change upload from database to DISK
hi,
just type /admin after the install path of the mantis installation then go to system utilities
regards
Dom75
just type /admin after the install path of the mantis installation then go to system utilities
regards
Dom75
Re: Change upload from database to DISK
Thank's very much. I delete this folder
Re: Change upload from database to DISK
That's why it's better to rename it and not to delete it
Re: Change upload from database to DISK
rename something like this 2Wj69rbU ?
At me simple delete. I can in averytime restore this folder
At me simple delete. I can in averytime restore this folder
Re: Change upload from database to DISK
Is one method for storing uploads better than the other for any reason? What are the pros and cons of each approach?
Re: Change upload from database to DISK
It is recommended to use the DISK for the following reasons:
1. The database doesn't get bloated with attachments, hence, it makes it typically easier to take a backup of the database.
2. In some hosting companies, you have much more disk space than database space.
3. Tools that allow remote administration with the database (e.g. phpMyAdmin) are not tuned to work with big size databases.
1. The database doesn't get bloated with attachments, hence, it makes it typically easier to take a backup of the database.
2. In some hosting companies, you have much more disk space than database space.
3. Tools that allow remote administration with the database (e.g. phpMyAdmin) are not tuned to work with big size databases.
Migrate your MantisBT to the MantisHub Cloud
Re: Change upload from database to DISK
Thank you all for your help, but still having some issues.......
It seems to be that I have 2688 attachments (not records) with about approximately about 200 MB, which are all situated in de database.
I have done some testing with moving the attachments to DISK with a smaller database which was doing fine.
But when I did the same procedure with the big database I got the following error:
"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4065281 bytes) in /www/htdocs/admin/move_db2disk.php on line 90"
In this stage, only about 1800 attachments have been saved to the DISK. So I lost a couple....hmmm. (bug maybe?)
Thank god I made a backup.
But how am I dealing with this issue. I have to move all the attachments from the DATABASE to DISK.
So far, I'm stuck.
Hopefully someone can help me out???
Thank you in advance for your help,
Marnix
It seems to be that I have 2688 attachments (not records) with about approximately about 200 MB, which are all situated in de database.
I have done some testing with moving the attachments to DISK with a smaller database which was doing fine.
But when I did the same procedure with the big database I got the following error:
"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4065281 bytes) in /www/htdocs/admin/move_db2disk.php on line 90"
In this stage, only about 1800 attachments have been saved to the DISK. So I lost a couple....hmmm. (bug maybe?)
Thank god I made a backup.
But how am I dealing with this issue. I have to move all the attachments from the DATABASE to DISK.
So far, I'm stuck.
Hopefully someone can help me out???
Thank you in advance for your help,
Marnix
Re: Change upload from database to DISK
Maybe it's better to perform a SQL statement directly from phpmyadmin to move the files to DISK.
Does anyone knows which SQL statement I should use?
Does anyone knows which SQL statement I should use?