RTx::Shredder to delete old tickets

Hi

Can RTx::Shredder be used to delete Tickets/Transactions for Tickets
older than may be one year?

I like to use that to reduce the size of my ibdata1 and ibdata2
tablespaces which are in total over 5 gig which is almost 80% of my file
partition in Solaris 8.

Thanks for the help
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There’s no place like 127.0.0.1

Asif Iqbal wrote:

Hi

Can RTx::Shredder be used to delete Tickets/Transactions for Tickets
older than may be one year?
yes, current rtx-shredder script do exactly this action.
/opt/rt3/local/sbin/rtx-shredder YYYY-MM-DD
Wipeout deleted tickets and all data that depends only on them.

Feedback is more then wellcome, it’s required.

I like to use that to reduce the size of my ibdata1 and ibdata2
tablespaces which are in total over 5 gig which is almost 80% of my file
partition in Solaris 8.
May be after shredding you should do some manipulation with mysql, I
don’t know if InnoDB engine reduce size of files after DELETE’s.

Thanks for the help

				Best regards. Ruslan.

Ruslan U. Zakirov wrote:

Asif Iqbal wrote:

Hi

Can RTx::Shredder be used to delete Tickets/Transactions for Tickets
older than may be one year?
yes, current rtx-shredder script do exactly this action.
/opt/rt3/local/sbin/rtx-shredder YYYY-MM-DD
Wipeout deleted tickets and all data that depends only on them.

How about deleting all tickets (resolved/deleted/stalled/…) from
YYYY-MM-DD to the beginning. For examples all tickets that are older
than say 2002-12-31

Can it do that?

Feedback is more then wellcome, it’s required.

I like to use that to reduce the size of my ibdata1 and ibdata2
tablespaces which are in total over 5 gig which is almost 80% of my file
partition in Solaris 8.
May be after shredding you should do some manipulation with mysql, I
don’t know if InnoDB engine reduce size of files after DELETE’s.

Thanks for the help

  			Best regards. Ruslan.

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There’s no place like 127.0.0.1

Hello.
OO API allow delete any RT object.

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’) or
add another Limit condition.

If you want delete more then 1k tickets at once you need much memory. I
had big memory footprint with 20k tickets, because of it I did step by
step wiping out. I’ll fix this problem next release.

			Best regards. Ruslan.

Asif Iqbal wrote:

Ruslan U. Zakirov wrote:

  Hello.

OO API allow delete any RT object.

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’) or
add another Limit condition.

If you want delete more then 1k tickets at once you need much memory. I
had big memory footprint with 20k tickets, because of it I did step by
step wiping out. I’ll fix this problem next release.

  		Best regards. Ruslan.

Is there any tool done by RT community to reduce the size of the ibdata tablespaces?

Asif Iqbal wrote:

Ruslan U. Zakirov wrote:

Asif Iqbal wrote:

Hi

Can RTx::Shredder be used to delete Tickets/Transactions for Tickets
older than may be one year?

yes, current rtx-shredder script do exactly this action.
/opt/rt3/local/sbin/rtx-shredder YYYY-MM-DD
Wipeout deleted tickets and all data that depends only on them.

How about deleting all tickets (resolved/deleted/stalled/…) from
YYYY-MM-DD to the beginning. For examples all tickets that are older
than say 2002-12-31

Can it do that?

Feedback is more then wellcome, it’s required.

I like to use that to reduce the size of my ibdata1 and ibdata2
tablespaces which are in total over 5 gig which is almost 80% of my file
partition in Solaris 8.

May be after shredding you should do some manipulation with mysql, I
don’t know if InnoDB engine reduce size of files after DELETE’s.

Thanks for the help

  			Best regards. Ruslan.

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There’s no place like 127.0.0.1

Asif Iqbal wrote:

Ruslan U. Zakirov wrote:

  Hello.

OO API allow delete any RT object.

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’) or
add another Limit condition.

If you want delete more then 1k tickets at once you need much memory. I
had big memory footprint with 20k tickets, because of it I did step by
step wiping out. I’ll fix this problem next release.

  		Best regards. Ruslan.

Is there any tool done by RT community to reduce the size of the ibdata tablespaces?
It’s mysql :slight_smile:
As I understood manual ibdata file never become smaller then it was, but
after DELETE, DROP mysql uses empty blocks.

Mysql allow recreate ibdata file, size would be as much as needed for
your data.
http://dev.mysql.com/doc/mysql/en/Adding_and_removing.html

Ok I saw this thread and thought COOL that rtx-shredder is exactly what
I have been looking for, so I changed dir to where it should be in the
installation tree, and WHAM-O , NO rt-shredder script.

So were can I get this, I guess that it did not come with my 3.011
distribution of RT.

Chris

So were can I get this, I guess that it did not come with my 3.011
distribution of RT.

It intentionally doesn’t come with the distribution. :slight_smile: Ruslan has
made it available via CPAN.

Michael
Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’)
or add another Limit condition.

If you want delete more then 1k tickets at once you need much memory.
I had big memory footprint with 20k tickets, because of it I did step
by step wiping out. I’ll fix this problem next release.

We need to all join my occasional pestering of Jesse to fully support
foreign key references in the database. :slight_smile:

The shredder script will then consist of something like “delete from
tickets where status=‘deleted’” and the FK references will take care of
chasing down all the references and purging them as well. You could
then just alter that delete query with whatever where clause you wanted
to suit your needs.

Vivek Khera wrote:

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’)
or add another Limit condition.

If you want delete more then 1k tickets at once you need much memory.
I had big memory footprint with 20k tickets, because of it I did step
by step wiping out. I’ll fix this problem next release.

We need to all join my occasional pestering of Jesse to fully support
foreign key references in the database. :slight_smile:
You can start from converting constrints.mysql file to other back-ends. :slight_smile:

I sent updated contraints(FULL) to devel list with comments where FK
have to be but is imposible to create because of RT design, for example
global queue is ‘0’, but there is no record with id ‘0’ in ‘Queues’ table.

I don’t know why Jesse doesn’t move to full FK coverage.

There is also places where it’s imposible to create FK: Attributes,
Principals.

The shredder script will then consist of something like “delete from
tickets where status=‘deleted’” and the FK references will take care of
chasing down all the references and purging them as well. You could then
just alter that delete query with whatever where clause you wanted to
suit your needs.
This is not just script, it’s distro. Big todo entry is “write export
tool”, this mean: you do delete and get copy in file with all deps, then
you can return object back or insert it into another RT instance(for
example into ‘archive RT instance’).

Wishes, Feedback are wellcom as usual :wink:
Ruslan.

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’)
or add another Limit condition.

If you want delete more then 1k tickets at once you need much memory.
I had big memory footprint with 20k tickets, because of it I did step
by step wiping out. I’ll fix this problem next release.

We need to all join my occasional pestering of Jesse to fully support
foreign key references in the database. :slight_smile:

The shredder script will then consist of something like “delete from
tickets where status=‘deleted’” and the FK references will take care of
chasing down all the references and purging them as well. You could
then just alter that delete query with whatever where clause you wanted
to suit your needs.

So, how do you deal with constraints for role groups? (Ticket watchers,
for example.)

Jesse Vincent wrote:

No script (rtx-shredder) is not full featured.
You can easy comment out Limit(FIELD => ‘Status’, VALUE => ‘deleted’)
or add another Limit condition.

If you want delete more then 1k tickets at once you need much memory.
I had big memory footprint with 20k tickets, because of it I did step
by step wiping out. I’ll fix this problem next release.

We need to all join my occasional pestering of Jesse to fully support
foreign key references in the database. :slight_smile:

The shredder script will then consist of something like “delete from
tickets where status=‘deleted’” and the FK references will take care of
chasing down all the references and purging them as well. You could
then just alter that delete query with whatever where clause you wanted
to suit your needs.

So, how do you deal with constraints for role groups? (Ticket watchers,
for example.)

triggers :slight_smile:

tickets, could it also delete the unprivileged users that no
longer had tickets in the system? I’m planning to start over

I did this shortly before my rt2->rt3 migration:

begin;

delete from users where id in (select users.id from users left join
attachments on (users.id=attachments.creator) where attachments.id is
null and users.privileged = 0);

delete from users where id in (select users.id from users left join
tickets on (users.id=tickets.creator) where tickets.id is null and
users.privileged = 0);

commit;

This is not just script, it’s distro. Big todo entry is “write export
tool”, this mean: you do delete and get copy in file with all deps, then
you can return object back or insert it into another RT instance(for
example into ‘archive RT instance’).

Wishes, Feedback are wellcom as usual :wink:

I have nearly as many users as tickets since most come from internet
email and I think some queries have to write temp files to complete
the join (this is in RT2). If I used shredder to delete old
tickets, could it also delete the unprivileged users that no
longer had tickets in the system? I’m planning to start over
with a clean RT3 install, but I’ll be in the same shape again next
year unless there is a clean way to remove things.

Les Mikesell
les@futuresource.com