How to restaure all wihtout the tickets

Dear all.

I’m making an upgrade from our RT system, from v5.0.7 to v6.0.2. For now all is running well. What I would do is to present to all of the staff this new version. And to do this i would like to let on my databases all of the information (accounts, queues, etc) but with no tickets at all. Using a specific test queue, i could show us this new version of RT. And they will have some time to learn. And as this, I would not have conflict with numbers of tickets (production RT system has ~5700 as ticket’s number)

In a first try, I suppose that clearing the “tickets” tables and restart the “tickets_id_seq” sequence should do the job. Sure mi first idea was too simple. And i have a “Ticket could not be created due to an internal error” when I send the first ticket on the test queue.

Maybe what i want to do is impossible? Or maybe I have to restore uniquely the account table, queue table o so on?

Hope someone could help me in this task.

Regards

If you have an empty RT and a Dev database, you can drop the database make dropdb and that will delete it, then you can create an empty DB make initdb just ensure it isn’t PROD you’re running this on or connected to or you will delete your prod DB.

Hi Knation

If i do like this i could not stay with the users accounts and defined groups and queue. I should have to do all by hand. What i don’t want to do.

Thank’s

I think running the shredder would be the cleanest way, batch it to something like 1000 tickets at a time:

sbin/rt-shredder --plugin 'Tickets=query,id>0' --limit 1000

Hi Knation.

You’re right! That’s do the job! Ths shredder take care about the tickets information in all the tables of the DB. Something new i learn today!

Thank’s!