Hi,
Been running OTRS 2.4.x for about a year now and the MySQL database is huge.
I'd like to switch to the File System storage for future attachments, but does anyone know how to etract exising attachments from the DB to FS storage? This would really help me reduce the size of my database.
Thanks
Jon
Switching StorageModule to ArticleStorageFS
Moderator: crythias
Switching StorageModule to ArticleStorageFS
Test : OTRS 3.1.12 with ITSM 3.1.7
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
-
- Znuny ninja
- Posts: 1029
- Joined: 13 Apr 2009, 12:26
- Znuny Version: 6.0.13
- Real Name: Wolfgang Fürtbauer
- Company: PBS Logitek GmbH
- Location: Pinsdorf
Re: Switching StorageModule to ArticleStorageFS
Jon,
have a look at /opt/otrs/bin/otrs.ArticleStorageSwitch.pl
BR
have a look at /opt/otrs/bin/otrs.ArticleStorageSwitch.pl
BR
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
Re: Switching StorageModule to ArticleStorageFS
It's in the 3.0.x manual (but even so applicable for 2.4.x):jforrow wrote:Hi,
Been running OTRS 2.4.x for about a year now and the MySQL database is huge.
I'd like to switch to the File System storage for future attachments, but does anyone know how to etract exising attachments from the DB to FS storage? This would really help me reduce the size of my database.
Thanks
Jon
http://doc.otrs.org/3.0/en/html/c3207.h ... rs-storage
huntingbears.nl - @michielbeijen on Twitter
Re: Switching StorageModule to ArticleStorageFS
Thanks, I switched over to FS Article Storage thorugh the SYSconfig interface last night.Mike_B wrote:
It's in the 3.0.x manual (but even so applicable for 2.4.x):
http://doc.otrs.org/3.0/en/html/c3207.h ... rs-storage
When I ran:
bin/otrs.ArticleStorageSwitch.pl -s ArticleStorageDB -d ArticleStorageFS
I got this error message before I stopped the script:
[Error][Kernel::System::Ticket::Article::ArticleAttachmentIndex][Line:3147]: Need UserID!
Nov 23 17:34:24 PPS-VM-OTRS last message repeated 1042 times
The httpd service is running as the otrs user, and I've confirmed that user can write to the filestore location "/var/otrs_filestore".
The script has started creating the directory structure in that location, so it's partly working.
Any ideas?
Thanks
Test : OTRS 3.1.12 with ITSM 3.1.7
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
Re: Switching StorageModule to ArticleStorageFS
This was reported as a bug today and a fix is available for download:
Bugzilla entry: http://bugs.otrs.org/show_bug.cgi?id=6382
File download: http://source.otrs.org/viewvc.cgi/otrs/ ... iew=markup
During testing I also found that I couldn't attach any files to tickets; I got a Permission denied error on CGITempFile.
I fixed this error by editing: I uncommented and edited this line: (Line 26 I think)
So now I could upload files to OTRS, but the conversion script (./otrs.ArticleStorageSwitch.pl -s ArticleStorageDB -d ArticleStorageFS) still gave these errors:
I checked line 105:
I saw it was missing the UserID variable. So it hacked it in:
I did the same to line 172:
Changed it to:
The script is re-running now and seems to be working correctly.
Bugzilla entry: http://bugs.otrs.org/show_bug.cgi?id=6382
File download: http://source.otrs.org/viewvc.cgi/otrs/ ... iew=markup
I think I've solved this issue myself:jforrow wrote:Thanks, I switched over to FS Article Storage thorugh the SYSconfig interface last night.Mike_B wrote:
It's in the 3.0.x manual (but even so applicable for 2.4.x):
http://doc.otrs.org/3.0/en/html/c3207.h ... rs-storage
When I ran:
bin/otrs.ArticleStorageSwitch.pl -s ArticleStorageDB -d ArticleStorageFS
I got this error message before I stopped the script:
[Error][Kernel::System::Ticket::Article::ArticleAttachmentIndex][Line:3147]: Need UserID!
Nov 23 17:34:24 PPS-VM-OTRS last message repeated 1042 times
The httpd service is running as the otrs user, and I've confirmed that user can write to the filestore location "/var/otrs_filestore".
The script has started creating the directory structure in that location, so it's partly working.
Any ideas?
Thanks
During testing I also found that I couldn't attach any files to tickets; I got a Permission denied error on CGITempFile.
I fixed this error by editing
Code: Select all
opt/otrs/Kernel/cpan-lib/CGI.pm
Code: Select all
$CGITempFile::TMPDIRECTORY = '/var/otrstmp/';
Code: Select all
ERROR: OTRS-otrs.ArticleStorageSwitch.pl-10 Perl: 5.8.8 OS: linux Time: Wed Nov 24 14:57:54 2010
Message: Need UserID!
Traceback (29755):
Module: Kernel::System::Ticket::Article::ArticleAttachmentIndex (v1.260) Line: 3147
Module: bin/otrs.ArticleStorageSwitch.pl (v1.10) Line: 105
ERROR: OTRS-otrs.ArticleStorageSwitch.pl-10 Perl: 5.8.8 OS: linux Time: Wed Nov 24 14:57:54 2010
Message: Need UserID!
Traceback (29755):
Module: Kernel::System::Ticket::Article::ArticleAttachmentIndex (v1.260) Line: 3147
Module: bin/otrs.ArticleStorageSwitch.pl (v1.10) Line: 172
Code: Select all
# read source attachments
my %Index = $TicketObjectSource->ArticleAttachmentIndex(
ArticleID => $ArticleID,
OnlyMyBackend => 1,
);
Code: Select all
# read source attachments
my %Index = $TicketObjectSource->ArticleAttachmentIndex(
ArticleID => $ArticleID,
OnlyMyBackend => 1,
UserID => 1,
);
Code: Select all
# verify destination attachments
%Index = $TicketObjectDestination->ArticleAttachmentIndex(
ArticleID => $ArticleID,
OnlyMyBackend => 1,
);
Code: Select all
# verify destination attachments
%Index = $TicketObjectDestination->ArticleAttachmentIndex(
ArticleID => $ArticleID,
OnlyMyBackend => 1,
UserID => 1,
);
Test : OTRS 3.1.12 with ITSM 3.1.7
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database