Backup Error

David Culbertson August 1, 2019

When running a backup on my fisheye / crucible server I get the error:

Error reading database: Table 'fisheye.cwd_group_attributes' doesn't exist

Backup failed

When I look in the database, I see a table 'fisheye.cwd_group_attribute'.  This does not have the letter 's' on the end like the error message.

Any idea how to correct this.  

1 answer

1 accepted

0 votes
Answer accepted
Felipe Kraemer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2019

Hello @David Culbertson

It has come to my attention that you have raised another question at https://community.atlassian.com/t5/Fisheye-Crucible-questions/Fisheye-4-7-0-Build-20190214100246-database-migration-from-MySQL/qaq-p/1142054 that is related to this one over here because both of them involve a database table named 'cwd_group_attribute'.

As far as I can see in both questions, the database migration script and the backup script are expecting to find the database table 'cwd_group_attribute' in the schema but this table cannot be found - possibly it was dropped somehow. 

Can you please connect to the database used by Fisheye 4.7.0 and verify if the table is really not there? There are no constraints blocking it from being dropped from the schema, so if it cannot be found it most likely was dropped.

In that case, simply creating that table should do the trick. Follow these steps:

1. Shut down Fisheye/Crucible

2. Connect to the database

3. Run this SQL statement:

CREATE TABLE cwd_group_attribute 
  ( 
     id                    BIGINT NOT NULL, 
     group_id              BIGINT NOT NULL, 
     directory_id          BIGINT NOT NULL, 
     attribute_name        VARCHAR(255) NOT NULL, 
     attribute_value       VARCHAR(255), 
     attribute_lower_value VARCHAR(255), 
     PRIMARY KEY (id), 
     CONSTRAINT fk_group_attr_dir_id FOREIGN KEY (directory_id) REFERENCES 
     `cwd_directory` (`id`), 
     CONSTRAINT fk_group_attr_id_group_id FOREIGN KEY (group_id) REFERENCES 
     `cwd_group` (`id`), 
     CONSTRAINT uk_group_name_attr_lval UNIQUE (group_id, attribute_name, 
     attribute_lower_value), 
     INDEX fk_group_attr_dir_id (directory_id), 
     INDEX fk_group_attr_id_group_id (group_id), 
     INDEX idx_group_attr_dir_name_lval (directory_id, attribute_name, 
     attribute_lower_value), 
     INDEX idx_group_attr_group_id (group_id) 
  ) 
engine=innodb 
DEFAULT charset=utf8 
DEFAULT COLLATE=utf8_bin;

4. Make sure that changes are committed

5. Start Fisheye/Crucible

If there aren't any other missing tables from the database, you should be able to backup your instance and also migrate to the new MySQL database.

Please do let me know how this goes!

Regards,

Felipe Kraemer

David Culbertson August 7, 2019

I fixed this a different way.  I went back to a valid DB from the day before and the migration went fine.  Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events