dbaclone icon indicating copy to clipboard operation
dbaclone copied to clipboard

New-DcnClone: -Force should remove existing clone files

Open lowlydba opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. I'm encountering issues where occasionally the clone files can't be created due to being locked by other processes (why is still TBD). This leaves orphaned files and no metadata entry for the clone. The next time I try to create the clone again, the function stops due to these checks:

https://github.com/dataplat/dbaclone/blob/0148b669664caee3c4f4634d4e2dad792d156edd/functions/clone/New-DcnClone.ps1#L398-L411

If using the -Force flag, it would be nice if these could be removed automatically instead of exiting, so that I don't have to write my own orphan file handling process outside of the function.

lowlydba avatar May 17 '22 19:05 lowlydba

I can make a PR if this is an acceptable change

lowlydba avatar May 17 '22 19:05 lowlydba