Issues with HTML and attachments after DB to FS switch

Moderator: crythias

Post Reply
giacomos
Znuny newbie
Posts: 10
Joined: 28 Sep 2022, 14:51
Znuny Version: 6.0.38
Real Name: Giacomo

Issues with HTML and attachments after DB to FS switch

Post by giacomos »

We have an installation of znuny 6.0.39 with 192k articles.

Recently we switched storage from DB to FS for our articles whose tickets closed by the end of 2022.

So all articles whose tickets closed after 2022-12-31 (and all opened tickets) are still on DB.

Our config is like this:

Code: Select all

Ticket::Article::Backend::MIMEBase::CheckAllStorageBackendsTicket.xml = Enabled
Ticket::Article::Backend::MIMEBase::ArticleStorage = Kernel::System::Ticket::Article::Backend::MIMEBase::ArticleStorageDB
Everything is OK with the exception that now the tickets that have been switched to FS have these issues:
  • 1. they show extra attachments in the "Attachments" column.
    By "extra" I mean that almost always "file-2-1" file is present as attachment.
    Other types of files that appear as attachment are "file-1-1", "image001.png" (or any other email-related img).
    I believe that all these extra attachments are part of the email that generated the article.
  • 2. HTML article have not been always preserved (i.e., they show up as plain text without formatting and images)
    (and I have the impression that those article are the same that are affected by the attachment problem)
    Some articles still maintain the HTML formatting and images though.
Apparently no data is lost (all "real" attachments are present), but we would like to clean those articles from the HTML and attachment issues.

How can we restore HTML articles and attachments from out filesystem-based tickets?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Issues with HTML and attachments after DB to FS switch

Post by root »

Hi,

There went something wrong. You can check this by renaming a file 'file-2-1' into 'file-2' and see how this looks in the GUI.

If you can see the HTML body then you have to fix the filenames

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
giacomos
Znuny newbie
Posts: 10
Joined: 28 Sep 2022, 14:51
Znuny Version: 6.0.38
Real Name: Giacomo

Re: Issues with HTML and attachments after DB to FS switch

Post by giacomos »

Thank you very much Roy for your reply!

After a quick test if seems that the issues are solved by renaming all file2-1* entries like this:
sudo -u otrs mv file-2-1 file-2
sudo -u otrs mv file-2-1.content_type file-2.content_type
sudo -u otrs mv file-2-1.disposition file-2.disposition
I will set up more tests and come back here to report.
Thanks again!
giacomos
Znuny newbie
Posts: 10
Joined: 28 Sep 2022, 14:51
Znuny Version: 6.0.38
Real Name: Giacomo

Re: Issues with HTML and attachments after DB to FS switch

Post by giacomos »

I confirm that I have restored HTML content and attachments for more than 40k tickets by renaming all

- "file-1-1.*" -> "file-1.*" and
- "file-2-1.*" -> "file-2.*" files under the article/ folder

I'm hoping that someone who has the same problem might find this thread helpful.

Thanks you very much again!
Post Reply