Hello,
after quite some hassle I just ran 'ArticleStorageSwitch.pl -s ArticleStorageDB -d ArticleStorageFS' successfully over our up-to-date OTRS 3.1.6 setup. It took quite some attempts to succeed. First some old articles had attachments without filename, and adding a filename in the database didn't help. Only way to solve it was to delete the ticket with GenericAgent. Then some attachments had issues with the filename encoding. Here it was sufficient to change the filename inside database. But finally ArticleStorageSwitch.pl ran over all 350.000 tickets and reported success: "NOTICE: done."
Now I checked size of the MySQL database and was quite supprised that it's still as large (12GB) as before the ArticleStorageSwitch script ran. I thought that the script would remove the attachments from database after copying them to the filesystem. /opt/otrs/var/article now has the same size (12GB).
Is there an option to remove the attachments from database after successfully moving them to filesystem? Or is it save to simply clear the database table article_attachments?
Regards,
jonas
ArticleStorageSwitch.pl: not removing Attachments from DB?
Moderator: crythias
Re: ArticleStorageSwitch.pl: not removing Attachments from D
did you also run an optimize table in the database afterwards?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 11
- Joined: 20 Feb 2012, 10:32
- Znuny Version: OTRS31
- Real Name: INTERNET AG
- Company: INTERNET AG
Re: ArticleStorageSwitch.pl: not removing Attachments from D
Yes, I first switched TicketStorageModule, then ran ArticleStorageSwitch.pl and finally ran 'optimize table' for MySQL tables ticket, ticket_history and articles.
From your question I deduce that the ArticleStorageSwitch usually deletes attachments from the database after they have been successfully copyed to the FS?
Is it possible to delete all copied data manually from the database? If yes, how?
From your question I deduce that the ArticleStorageSwitch usually deletes attachments from the database after they have been successfully copyed to the FS?
Is it possible to delete all copied data manually from the database? If yes, how?
Re: ArticleStorageSwitch.pl: not removing Attachments from D
optimize article_plain and article_attachment (and probably article_flag) too...
-
- Znuny newbie
- Posts: 11
- Joined: 20 Feb 2012, 10:32
- Znuny Version: OTRS31
- Real Name: INTERNET AG
- Company: INTERNET AG
Re: ArticleStorageSwitch.pl: not removing Attachments from D
Great, optimizing these tables finally reduced the MySQL database size from 12G to 2.9G. Thanks for the hint. Maybe this should be documented at http://doc.otrs.org/3.0/en/html/perform ... rs-storage though.