[rt-users] rt-shredder madness
Lists
lists at lolling.org
Fri Jun 20 11:26:38 EDT 2014
Hi,
I have been trying to run rt-shredder to clean up my database before
upgrading and an unable to get it to work. I have been following the
syntax either as presented by the ./rt-shredder --plugin help-Tickets as
well as what is documented in the 4.2.5 section of the website and
nothing seems to work.
As per the examples, here is the latest command I tried executing which
errors out.
./rt-shredder --plugin 'Tickets=query,Status = "deleted" OR Status =
"rejected" ) LastUpdated < '2006-11-29 20:34:26''
SQL dump file is '/opt/rt4/sbin/20140620T152023-0001.sql'
[25293] [Fri Jun 20 15:20:23 2014] [error]: Couldn't parse query: Wrong
query, expecting a AGGREGATOR in 'Status = "deleted" OR Status =
"rejected" >)<--here LastUpdated < 2006-11-29' at
/opt/rt4/sbin/../lib/RT/SQL.pm line 130.
(/opt/rt4/sbin/../lib/RT/Tickets.pm:3030)
Couldn't load plugin
Error: Bad query argument, error: Wrong query, expecting a AGGREGATOR in
'Status = "deleted" OR Status = "rejected" >)<--here LastUpdated <
2006-11-29' at /opt/rt4/sbin/../lib/RT/SQL.pm line 130.
I have also tried other variations:
./rt-shredder --plugin 'Tickets=query,LastUpdated = "2007-01-10 22:31:10"'
SQL dump file is '/opt/rt4/sbin/20140620T152132-0001.sql'
[25298] [Fri Jun 20 15:21:32 2014] [warning]: DBD::mysql::st execute
failed: Unknown column 'main.IsMerged' in 'where clause' at
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 589.
(/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:589)
[25298] [Fri Jun 20 15:21:32 2014] [warning]: RT::Handle=HASH(0x1190db8)
couldn't execute the query 'SELECT main.* FROM Tickets main WHERE
(main.IsMerged IS NULL) AND (main.Type = 'ticket') AND ( (
main.LastUpdated >= '2007-01-10 06:00:00' AND main.LastUpdated <
'2007-01-11 06:00:00' ) ) ORDER BY main.id ASC LIMIT 10' at
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 602.
DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x1190db8),
"SELECT main.* FROM Tickets main WHERE (main.IsMerged IS NULL"...)
called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 239
DBIx::SearchBuilder::_DoSearch(RT::Tickets=HASH(0x591c288))
called at /opt/rt4/sbin/../lib/RT/SearchBuilder.pm line 983
RT::SearchBuilder::_DoSearch(RT::Tickets=HASH(0x591c288))
called at /opt/rt4/sbin/../lib/RT/Tickets.pm line 2377
RT::Tickets::_DoSearch(RT::Tickets=HASH(0x591c288)) called at
/usr/local/share/perl5/DBIx/SearchBuilder.pm line 507
DBIx::SearchBuilder::Next(RT::Tickets=HASH(0x591c288)) called
at /opt/rt4/sbin/../lib/RT/Tickets.pm line 2349
RT::Tickets::Next(RT::Tickets=HASH(0x591c288)) called at
/opt/rt4/sbin/../lib/RT/Shredder.pm line 354
RT::Shredder::CastObjectsToRecords("RT::Shredder", "Objects",
RT::Tickets=HASH(0x591c288)) called at
/opt/rt4/sbin/../lib/RT/Shredder.pm line 363
RT::Shredder::CastObjectsToRecords("RT::Shredder", "Objects",
ARRAY(0x357c608)) called at ./rt-shredder line 268
main::process_plugins(RT::Shredder=HASH(0x10af448)) called at
./rt-shredder line 164 (/usr/local/share/perl5/Carp.pm:169)
Objects list is empty, try refine search options
The two errors I keep encountering are
Error: Bad query argument, error: Wrong query, expecting a AGGREGATOR ....
or
Objects list is empty, try refine search options
Like I said, I have tried many variations.
Can anyone see what I am doing wrong?
Thanks,
Dave
More information about the rt-users
mailing list