<div dir="ltr"><div><div><div><div><div><div>I,<br><br></div>thanks a lot for your help....<br><br></div>The util "<span dir="ltr" id=":1mn">rt-delete-tickets-mysql</span>" seems to be perfect for what I want.... I just have to change the initial query from:<br>
"DELETE FROM Tickets WHERE Status = deleted"<br>to<br></div>"DELETE FROM Tickets WHERE LastUpdate = '2 year ago'"<br><br><br></div>Now I just have to find the right query...<br><br></div>Again thanks a lot for your help... I didn't know about that utils package...<br>
<br></div>Cheers<br></div><div class="gmail_extra"><br clear="all"><div><font size="-1"><b>Flávio Moringa</b></font><font size="1"><br>
Project Leader<br><br><img src="http://people.caixamagica.pt/flaviomoringa/images/caixamagica.png"><br>
<br>
Caixa Mágica Software<br>
Energia Open Source<br>
Rua Soeiro Pereira Gomes, Lote 1 - 4.º B,<br>
Edifício Espanha, 1600-196 Lisboa - Portugal<br>
Tel.: +351 217 921 260 Fax: +351 217 921 261<br><a href="http://www.caixamagica.pt" target="_blank">http://www.caixamagica.pt</a><br>
<a href="https://twitter.com/flaviomoringa" target="_blank">https://twitter.com/flaviomoringa</a><br>
<a href="https://www.facebook.com/flavio.moringa" target="_blank">https://www.facebook.com/flaviomoringa</a><br><a href="http://pt.linkedin.com/in/flaviomoringa" target="_blank">http://pt.linkedin.com/in/flaviomoringa</a><br>
</font><font size="1"><a href="http://people.caixamagica.pt/flaviomoringa" target="_blank">http://people.caixamagica.pt/flaviomoringa</a><br><br></font></div>
<br><br><div class="gmail_quote">2013/4/9 Bart <span dir="ltr"><<a href="mailto:bart@pleh.info" target="_blank">bart@pleh.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>This page contains the info on the command:</div><div><br></div><ul><li><a href="http://bestpractical.com/rt/docs/3.8/rt-shredder.html" target="_blank">http://bestpractical.com/rt/docs/3.8/rt-shredder.html</a><br>

</li></ul><div><br></div><div>And some info if you want to use the API:</div><div><br></div><div><ul><li><a href="http://bestpractical.com/rt/docs/3.8/RT/Shredder.html" target="_blank">http://bestpractical.com/rt/docs/3.8/RT/Shredder.html</a><br>

</li></ul></div><div><br></div><div>Another thing you might want to look at are the extension Utils:</div><div><br></div><div><ul><li><a href="http://search.cpan.org/~ruz/RT-Extension-Utils/lib/RT/Extension/Utils.pm" target="_blank">http://search.cpan.org/~ruz/RT-Extension-Utils/lib/RT/Extension/Utils.pm</a><br>

</li><li><a href="http://search.cpan.org/~ruz/RT-Extension-Utils/MANIFEST" target="_blank">http://search.cpan.org/~ruz/RT-Extension-Utils/MANIFEST</a><br></li></ul></div><div><br></div><div>As Kevin puts it, Utils are Ruslans bag of tricks. It also contains a commando for extracting attachments/deleting tickets, so maybe that's what you can use to make things a bit more easy. (the manifest page shows the included commands)</div>

<div><br></div><div><br></div><div>Hope this helps a little.</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">2013/4/8 Flavio Moringa <span dir="ltr"><<a href="mailto:flavio.moringa@caixamagica.pt" target="_blank">flavio.moringa@caixamagica.pt</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>I guys,<br><br></div>I haven't come across a straight answer to this, so my apologies if this has been answered before.<br>

<br></div>I have a 3.6 Request Tracker instance running.... (and no.. updating right now is not possible)....<br>
<br></div>I want to delete all tickets (and respective attachments, etc) that are older than 2 years...<br><br></div>My approach is using rt-shredder... by installing the cpan module (<a href="http://search.cpan.org/dist/RTx-Shredder/lib/RTx/Shredder.pm" target="_blank">http://search.cpan.org/dist/RTx-Shredder/lib/RTx/Shredder.pm</a>)<br>


<br></div>So what is the  cli command to do this? I don't need backups.. so no dump is required....<br><br></div>I have about 600 Gb worth of data.... 99% on the attachments table.... And want to clean all this up...<br>


<br></div><div>There is an answer on the mailling list about this<font><font face="Verdana,Arial,Helvetica"> on </font></font><font color="black" face="Verdana,Arial,Helvetica"><font color="black" face="Verdana,Arial,Helvetica"><small>Jul 13, 2004... that simpl<font>y says that to delete for a giving year do:</font></small></font></font><br>


<br><font color="black" face="Verdana,Arial,Helvetica"><font color="black" face="Verdana,Arial,Helvetica">rtx-shredder YYYY-MM-DD </font></font><br><br></div><div>But seems to old...<br></div><div><br></div>Can you help me? seems like a basic think to do...<br>


<br></div>Thanks in advance.<br><div><br></div><div><font color="black" face="Verdana,Arial,Helvetica"><font color="black" face="Verdana,Arial,Helvetica">Yours trully<br></font></font></div><div><br><div><div><div><div><div>


<div><div><div><div><font size="-1"><b>Flávio Moringa</b></font><font size="1"><br>
Project Leader<br><br><img><br>
<br>
Caixa Mágica Software<br>
Energia Open Source<br>
Rua Soeiro Pereira Gomes, Lote 1 - 4.º B,<br>
Edifício Espanha, 1600-196 Lisboa - Portugal<br>
Tel.: <a href="tel:%2B351%20217%20921%20260" value="+351217921260" target="_blank">+351 217 921 260</a> Fax: <a href="tel:%2B351%20217%20921%20261" value="+351217921261" target="_blank">+351 217 921 261</a><br><a href="http://www.caixamagica.pt" target="_blank">http://www.caixamagica.pt</a><br>

<a href="https://twitter.com/flaviomoringa" target="_blank">https://twitter.com/flaviomoringa</a><br>
<a href="https://www.facebook.com/flavio.moringa" target="_blank">https://www.facebook.com/flaviomoringa</a><br><a href="http://pt.linkedin.com/in/flaviomoringa" target="_blank">http://pt.linkedin.com/in/flaviomoringa</a><br>


</font><font size="1"><a href="http://people.caixamagica.pt/flaviomoringa" target="_blank">http://people.caixamagica.pt/flaviomoringa</a><br><br></font></div>
</div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Bart G.
</font></span></div>
</blockquote></div><br></div>