How can we help you today? How can we help you today?

New-SqlCloneImage gives 'Image already exists'

I'm new to SQL Clone, and I am figuring out how to make images from backup files (.bak). I was once successfull with that, removed the image file, and tried again. Then got the error 'Image already exists'.

Then I tried to execute 'Remove-SqlCloneImage', that gave back an Id, but New-SqlCloneImage keeps giving the error 'Image already exists'.

How can I REALLY remove the image, so that I kan run New-SqlCloneImage' again?

Gert Vlot
0

Comments

10 comments

  • Mark R
    Remove-SqlCloneImage should fully remove the image. Could you send us a screenshot of dashboard on the web UI?
    Mark R
    0
  • Gert_Vlot
    Hello Mark, see attachment
    Gert_Vlot
    0
  • Mark R
    Ah - I mean the SQL Clone web UI, not the PowerShell interface.
    Mark R
    0
  • Gert_Vlot
    The web UI gives no problems indeed, but it is our intention to use powershell, because we have so many databases.
    Gert_Vlot
    0
  • Mark R
    That's fine, you can use PowerShell, but the quickest way for me to get an overview of the situation so I can help would be a screenshot of the web UI.
    Mark R
    0
  • Gert_Vlot
    Here you have a screen copy of the web UI.
    Gert_Vlot
    0
  • Mark R
    OK - so SQL Clone still things the ProPolis_FinancieelSSI... image still exists. An image isn't just a file - it's also metadata stored in SQL Clone, so just deleting the file won't delete the image, you always need to delete image from SQL Clone. I'm not sure why running Remove-SqlCloneImage didn't work though.

    Most SQL Clone cmdlets just start an operation, and return immediately, including Remove-SqlCloneImage. They return an operation id that you can then pass to Wait-SqlCloneOperation. Could you try running Remove-SqlCloneImage again, piping the output to Wait-SqlCloneOperation? Like in example 2 on https://documentation.red-gate.com/clone2/automation/powershell-cmdlet-reference/remove-sqlcloneimage?

    Mark R
    0
  • Gert_Vlot
    Then I get an error on Remove-SqlCloneImage. See attachment. Same error when I try to remove the image in the Web UI.
    Gert_Vlot
    0
  • Gert_Vlot
    Cannot find a part of the path .... (in English)
    Gert_Vlot
    0
  • Mark R
    Ah, turns out SQL Clone can't delete an image if its backing folder has been deleted outside of SQL Clone. This is a bug in SQL Clone which I have now fixed. We will hopefully release today, if not Monday.
    Mark R
    0

Add comment

Please sign in to leave a comment.