upgrade OTRS - database too big

Moderator: crythias

Locked
NTHuser
Znuny newbie
Posts: 31
Joined: 20 Jun 2013, 14:50
Znuny Version: 3.2.1

upgrade OTRS - database too big

Post by NTHuser »

hi
our company is using otrs since 2009 and no one didn't remove any old datas
they assigned me for OTRS
i have looked into mysql concept now and i saw 2 big tables (article_attachment 15GB and article_plain 19GB )
can anyone explain me what are these tables are used to?
or how can i delete all old data and leave only from 1.1.2012. to today...
DB is now 40GB and it need 12 hours to do backup... and i have only 8 to create upgrade from 2.4.5 to 3.2

ps
is it safe to delete all entries from earlier dates in these tables?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: upgrade OTRS - database too big

Post by reneeb »

Use the GenericAgent for this task. You can find the GenericAgent when you click on "Admin" in the navigation bar. Ticket criteria should be "created before 1.1.2012". And later say "Delete tickets"... Then run the GenericAgent.

And you probably should switch the attachment storage from database to filesystem.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
NTHuser
Znuny newbie
Posts: 31
Joined: 20 Jun 2013, 14:50
Znuny Version: 3.2.1

Re: upgrade OTRS - database too big

Post by NTHuser »

reneeb wrote:Use the GenericAgent for this task. You can find the GenericAgent when you click on "Admin" in the navigation bar. Ticket criteria should be "created before 1.1.2012". And later say "Delete tickets"... Then run the GenericAgent.

And you probably should switch the attachment storage from database to filesystem.

im testing this solution and i have started cca 1500 entries to delete and question is at that time can agents work or it has to be downtime since i cant load otrs now (lucky on test env before on real server)

i cant even access mysql or my OTRS dashboard
NTHuser
Znuny newbie
Posts: 31
Joined: 20 Jun 2013, 14:50
Znuny Version: 3.2.1

Re: upgrade OTRS - database too big

Post by NTHuser »

i left it over the night to do cuz i thought it might be overloaded... but still same problem
unable to get in OTRS, endless loading, unable to get in database
how do i solve this?

when i try to restart apache on ssh i get this msg
"The Alias directive in /etc/apache2/sites-enabled/000-default at line 52 will probably never match because it overlaps an earlier Alias."


is it safe just do query to erase things from these 2 tables or not?


somehow i manage to enter in otrs and it worked fine, i set my filter to delete 1 ticket with generic agent and it worked, then again i set filter ( 1400 records ) and again its stuck at loading, what is limit to delete tickets with generic agent?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: upgrade OTRS - database too big

Post by reneeb »

There should be no limit. Can you call the generic agent via terminal? There is a script called otrs.GenericAgent.pl in the <OTRS_HOME>/bin directory.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
NTHuser
Znuny newbie
Posts: 31
Joined: 20 Jun 2013, 14:50
Znuny Version: 3.2.1

Re: upgrade OTRS - database too big

Post by NTHuser »

looks like when i start generic agent my disk usage goes to 100%
NTHuser
Znuny newbie
Posts: 31
Joined: 20 Jun 2013, 14:50
Znuny Version: 3.2.1

Re: upgrade OTRS - database too big

Post by NTHuser »

generic agent is doin some copy to tmp folder any way i can set it not to save it there? or not save anything to tmp since i want free my space from disk not fill it
Locked