[SOLVED] DB clean up

Moderator: crythias

Locked
gpayo
Znuny newbie
Posts: 3
Joined: 03 Aug 2011, 14:34
Znuny Version: 2.3.4
Real Name: Gonzalo

[SOLVED] DB clean up

Post by gpayo »

Hello colleagues,

We are using OTRS in our company for +5 years. The current version we user is 2.3.4 with a MySQL DB.

Currently we use around 19Gb in DB data and I need to start thinking a way to free some space there. Ideally I'd like to find a way in which I can back up the data by years and the erase that data out of the DB and only keep one year of tickets.

The only script I've found is the one called

Code: Select all

/scripts/backup.pl
but that scripts only backup the entire DB (plus source code) but does not delete any.

Can anyone help on this? If you can give the needed SQL sentences I'd do it myself.

Thanks a lot
Last edited by gpayo on 03 Aug 2011, 15:06, edited 1 time in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: DB clean up

Post by crythias »

You could use Generic Agent to search and delete old tickets.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
gpayo
Znuny newbie
Posts: 3
Joined: 03 Aug 2011, 14:34
Znuny Version: 2.3.4
Real Name: Gonzalo

Re: DB clean up

Post by gpayo »

Yes, I could do that but then... How can I backup them?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: DB clean up

Post by crythias »

Make a database dump.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
gpayo
Znuny newbie
Posts: 3
Joined: 03 Aug 2011, 14:34
Znuny Version: 2.3.4
Real Name: Gonzalo

Re: DB clean up

Post by gpayo »

Thanks crythias, you are very helpful.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED] DB clean up

Post by crythias »

I should have posted that if you're using FS/FileSystem storage of attachments, you'll want to address that issue as well.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked