Database

Moderator: crythias

Post Reply
pidilandia
Znuny newbie
Posts: 44
Joined: 19 Sep 2017, 11:48
Znuny Version: 5.0.16

Database

Post by pidilandia »

Hi,
I would need your help.
my otrs server has disk full. I have seen that the database has "article_attachment" and "article_plain" of over 200Gb. Do you think it is possible to reduce them?
I don't need attachments, can I delete them directly from my phpmyadmin in "article_attachment"?
What can I do in "article_plain"?

Best regards,
PP
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Database

Post by root »

Hi,

It depends on your database configuration to free some of this space. If the table type is InnoDB you could delete old tickets and try to reclaim that space. But this is done by copy the remaining data into a temporary table. You need at least the same amount of free space what the size of the table is. Any chance to add disk space to the system?

- 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 ?
pidilandia
Znuny newbie
Posts: 44
Joined: 19 Sep 2017, 11:48
Znuny Version: 5.0.16

Re: Database

Post by pidilandia »

Hi,
thanks for your advice.
I thought I would delete attachments without problems by deleting them from "article_attachment".
My table is InnoDB and unfortunately I cannot expand the space because the server is cloud.
Can't I delete attachments?

PP
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Database

Post by root »

Hi,

Deleting rows from a table with the type InnoDB does not free the space immediately.
But, if you are using innodb_file_per_table then you can reclaim the space by running OPTIMIZE TABLE on that table. OPTIMIZE TABLE will create a new identical empty table. Then it will copy row by row data from the old table to the new one. In this process, a new .ibd tablespace will be created and space will be reclaimed.
Keeping this in mind you need the setting innodb_file_per_table already active and have enough space for the copy process.

I recommend consulting a Linux/Database specialist.

- 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 ?
pidilandia
Znuny newbie
Posts: 44
Joined: 19 Sep 2017, 11:48
Znuny Version: 5.0.16

Re: Database

Post by pidilandia »

I will do what you advise me.

Thank you so much!

PP
Post Reply