Recently I upgraded from 6.3.4 to 6.4.4, and after that I migrated articles from FS to DB using Admin::Article::StorageSwitch
I've noticed that attachments are missing from older tickets (I confirmed that those attachments are present in database) and clicking on 'plain format' results in
"Can't read plain article! Maybe there is no plain email in backend! Read backend message."
Logs are unhelpful (same message repeated without context)
Any pointers how to debug this further? Thanks.
Missing attachments, missing plain versions
Moderator: crythias
-
- Administrator
- Posts: 3961
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Missing attachments, missing plain versions
Hi,
Have you also changed the system configuration Ticket::Article::Backend::MIMEBase::ArticleStorage?
- Roy
Have you also changed the system configuration Ticket::Article::Backend::MIMEBase::ArticleStorage?
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 21
- Joined: 24 Aug 2012, 18:58
- Znuny Version: 6.4.4
- Real Name: Pawel Tyll
- Company: Nitronet sp. z o.o.
Re: Missing attachments, missing plain versions
I did now, and everything's working as expected
Thank you.
Please fix the docs... add a mention of this in Admin::Article::StorageSwitch.
Cheers!
Thank you.
Please fix the docs... add a mention of this in Admin::Article::StorageSwitch.
Cheers!
-
- Moderator
- Posts: 391
- Joined: 30 Jan 2008, 02:26
- Znuny Version: All of them ^^
- Real Name: Hannes
- Company: Znuny|OTTERHUB
Re: Missing attachments, missing plain versions
Hi,
just to be sure.
Did you missed this or what do you want to be added? Maybe you can give me a hint.
Thanks!
just to be sure.
Did you missed this or what do you want to be added? Maybe you can give me a hint.
Thanks!
You do not have the required permissions to view the files attached to this post.
-
- Znuny newbie
- Posts: 21
- Joined: 24 Aug 2012, 18:58
- Znuny Version: 6.4.4
- Real Name: Pawel Tyll
- Company: Nitronet sp. z o.o.
Re: Missing attachments, missing plain versions
Code: Select all
$ bin/otrs.Console.pl Admin::Article::StorageSwitch --help
Migrate article files from one storage backend to another on the fly.
Usage:
otrs.Console.pl Admin::Article::StorageSwitch --target ... [--source ...] [--tickets-closed-before-date ...] [--tickets-closed-before-days ...] [--tolerant] [--micro-sleep ...] [--force-pid]
Options:
--target ... - Specify the target backend to migrate to (ArticleStorageDB|ArticleStorageFS).
[--source ...] - Specify the source backend to migrate from (ArticleStorageDB|ArticleStorageFS).
[--tickets-closed-before-date ...] - Only process tickets closed before given ISO date.
[--tickets-closed-before-days ...] - Only process tickets closed more than ... days ago.
[--tolerant] - Continue after failures.
[--micro-sleep ...] - Specify microseconds to sleep after every ticket to reduce system load (e.g. 1000).
[--force-pid] - Start even if another process is still registered in the database.
[--help] - Display help for this command.
[--no-ansi] - Do not perform ANSI terminal output coloring.
[--quiet] - Suppress informative output, only retain error messages.
Help:
The Admin::Article::StorageSwitch command migrates article data from one storage backend to another on the fly, for example from DB to FS:
otrs.Console.pl Admin::Article::StorageSwitch --target ArticleStorageFS
You can specify limits for the tickets migrated with --tickets-closed-before-date and --tickets-closed-before-days.
To reduce load on the database for a running system, you can use the --micro-sleep parameter. The command will pause for the specified amount of microseconds after each ticket.
otrs.Console.pl Admin::Article::StorageSwitch --target ArticleStorageFS --micro-sleep 1000
-
- Moderator
- Posts: 391
- Joined: 30 Jan 2008, 02:26
- Znuny Version: All of them ^^
- Real Name: Hannes
- Company: Znuny|OTTERHUB
Re: Missing attachments, missing plain versions
Yeah ok. Understand.
We will add the link to the docs in the output, this should help.
Not from using command before reading the docs, but at least you get a hint that it might be a good idea
have a great weekend!
Johannes
We will add the link to the docs in the output, this should help.
Not from using command before reading the docs, but at least you get a hint that it might be a good idea
have a great weekend!
Johannes
-
- Znuny newbie
- Posts: 21
- Joined: 24 Aug 2012, 18:58
- Znuny Version: 6.4.4
- Real Name: Pawel Tyll
- Company: Nitronet sp. z o.o.
Re: Missing attachments, missing plain versions
Well, IMO proper fix would be reworking how the command works, i.e. by making it set the setting to desired value after it finishes it's job, or adding some last resort check before popping the mentioned error message, i.e. if setting is FS, and data is not on FS, check DB, then pop the error, but you know the code, so you'll be the best judge how to improve this, if it all. From 'help' message I figured that someone planned this tool to be used for archiving, so this would improve usability in such cases: attachments would still be available (from possibly slower media), instead of yielding an, somewhat cryptic, error message.
All that being said, I did search for solution before making a post here, and didn't find anyone with my problem, so either keeping articles and attachments in database isn't popular, or everyone but me discovers such possibility by reading the documentation first, not by accident
All that being said, I did search for solution before making a post here, and didn't find anyone with my problem, so either keeping articles and attachments in database isn't popular, or everyone but me discovers such possibility by reading the documentation first, not by accident
-
- Administrator
- Posts: 3961
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Missing attachments, missing plain versions
Hi,ofca wrote: ↑10 Dec 2022, 19:53 Well, IMO proper fix would be reworking how the command works, i.e. by making it set the setting to desired value after it finishes it's job, or adding some last resort check before popping the mentioned error message, i.e. if setting is FS, and data is not on FS, check DB, then pop the error, but you know the code, so you'll be the best judge how to improve this, if it all. From 'help' message I figured that someone planned this tool to be used for archiving, so this would improve usability in such cases: attachments would still be available (from possibly slower media), instead of yielding an, somewhat cryptic, error message.
All that being said, I did search for solution before making a post here, and didn't find anyone with my problem, so either keeping articles and attachments in database isn't popular, or everyone but me discovers such possibility by reading the documentation first, not by accident
Changing the system configuration is not always desired for this command. There exist use cases where you keep the last x month in the database and the rest in the file system, or similar settings. That's why there is also a setting for checking all backends.
- 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 ?
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 ?