Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.0.2
-
None
Description
When an anonymised backup is created, all sensitive data is replaced by a sequence of 'x' characters.
This causes problems when restoring the backup, such as this:
Database error at cru_revision:4999 (table:row) of the input: Duplicate entry 'xxx-10142-xxx' for key 'cru_source_name' INFO - Closing com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext@3db158db: startup date [Wed Jul 31 13:50:53 BRT 2013]; root of context hierarchy INFO - *** application context closed *** java.io.IOException: Error writing to the database: Duplicate entry 'xxx-10142-xxx' for key 'cru_source_name' at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:205) at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:169) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:191) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:267) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:99) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) Caused by: java.sql.BatchUpdateException: Duplicate entry 'xxx-10142-xxx' for key 'cru_source_name' at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443) at com.atlassian.crucible.migration.item.DBImporter$BatchInserter.flush(DBImporter.java:313) at com.atlassian.crucible.migration.item.DBImporter$BatchInserter.executePS(DBImporter.java:308) at com.atlassian.crucible.migration.item.DBImporter$BaseInserter.execute(DBImporter.java:456) at com.atlassian.crucible.migration.item.DBImporter.importTable(DBImporter.java:182) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:134) at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:188) ... 9 more Restore failed. This may leave your target FISHEYE_INST directory (/my/path/to/fecru-3.0.2) in an inconsistent state.
Maybe instead of replacing sensitive data by 'xxxx' it could replace by a hash that could be decrypted? This would avoid having duplicate entries in the backup due to 'xxxx' usage.