Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up imported data of source vCenter. "Duplicate entry:" #19

Open
jaygopalu opened this issue Apr 19, 2018 · 1 comment
Open

Clean up imported data of source vCenter. "Duplicate entry:" #19

jaygopalu opened this issue Apr 19, 2018 · 1 comment

Comments

@jaygopalu
Copy link

jaygopalu commented Apr 19, 2018

Hi,

I do not know how, but i somehow seem to have managed to create duplicate entries on the db with my import from vCenter. Could this happen to VMs with multiple IPs?

I am using MySQL, i ran below sql to identify if there are duplicate entries and yes two records with count 2.
select object_name, count(*) c from imported_row group by object_name having c>1;

I did not delete duplicate entries considering those records may have reference in other tables and i may end up with some stale records. How can i safely clean it up? I am okay to drop entire imported data too.

Thank you,
Jay

image

@jaygopalu jaygopalu changed the title Clean up imported data of source vCenter."Duplicate entry: Clean up imported data of source vCenter. "Duplicate entry:" Apr 19, 2018
@jaygopalu
Copy link
Author

It might be is crude, but here is what i did and all is fine right now.

  1. Backed up my db using mysqldump.
  2. deleted content of all tables starting with "import*" using below.
    truncate table
  3. restarted all services.
  4. added 'import source' again & configured 'sync rule'.

Please share your views and any other means of solving this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant