Remember that a project is a header - it lists the field, notification, permission, screen, workflow SCHEMES that make up the project. If you delete a project, you lose the list of schemes you had in use, but you do NOT lose the schemes themselves.
Deleting and recreating a project is mostly going to be the best way - I simply take a copy of the schemes it's using before deletion. The more painful bit is components and versions if you want to preserve them.
FWIW, Deleting from the database is a monumental pain in the neck. You have to understand all the relationships and tables affected - jiraissues is a start, but you then need to deal with changegroup and changeitem, customfieldvalue, the workflow tables, and so-on. Then there's the need for downtime, proven backups and reindexing etc. It's FAR more easy to use the UI or scripts.
Yes, it deletes all customisations. You could try the script runner plugin (https://studio.plugins.atlassian.com/wiki/display/GRV/Script+Runner) which has a built-in script to copy a project with customisations (but without issues).
JIRA Command Line Interface has a cloneProject action that will get you most of the way there. In your case, clone project to a temporary, delete old one, then clone temporary to replace the original. You will need to fix up a few things that clone doesn't currently cover. In your case, you will need to use:
--copyVersions --copyComponents --copyRoleActors
It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs