How to back up only 1 project's data
Posted: 20 Jun 2005, 14:19
I work in a consulting firm with several different clients. I have no problem using Mantis' built-in security to prevent one customer from seeing another customer's projects.
BUT... at the end of a project, we want to give each client a backup of their defects. How can I do a database dump for only 1 client's project?
So far we're doing this:
1) Making a dump of the entire database (to preserve the original)
2) Creating a new database and loading the dump into it
3) Using a mass of SQL statements to DELETE FROM each of the tables, to remove everything that isn't part of that clients' project. (I had to map out all of the foreign keys and data relationships to figure it out.)
4) Now that the data is sanitized, I make a dump of this database and present it to the client.
Is there an easier way? Does anyone else have the same issue, and if so, how do you handle it?
--Mitch
BUT... at the end of a project, we want to give each client a backup of their defects. How can I do a database dump for only 1 client's project?
So far we're doing this:
1) Making a dump of the entire database (to preserve the original)
2) Creating a new database and loading the dump into it
3) Using a mass of SQL statements to DELETE FROM each of the tables, to remove everything that isn't part of that clients' project. (I had to map out all of the foreign keys and data relationships to figure it out.)
4) Now that the data is sanitized, I make a dump of this database and present it to the client.
Is there an easier way? Does anyone else have the same issue, and if so, how do you handle it?
--Mitch