You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure you are able to reproduce it on the latest released version (we release often)
Verified this bug is not already reported in an issue
Verified errors are not related to permissions
Can reproduce in a clean PowerShell session (clean = powershell -NoProfile)
Describe the bug
When running the command: Remove-DcnImage -unused -keep 1
I would expect the command to remove unused images and keep the most recent image for each database. However, removes all unused and keeps the most recent image.
For example, I have 3 database images created on 1/7 and generate a new image for each database on 2/7. This gives me the below table:
ImageID
Database
Used?
Created
1
Db1
unused
1/7/2021
4
Db1
unused
2/7/2021
2
Db2
unused
1/7/2021
5
Db2
unused
2/7/2021
3
Db3
unused
1/7/2021
6
Db3
unused
2/7/2021
When you run the above command it would remove all images, leaving only 1 image (ImageID 6). I would expect it to only remove the oldest image per database, leaving us with ImageID 4, 5, and 6.
Is this intended? Are you meant to specify the database when using -unused -keep [x]?
I'm using dbaclone version:
0.10.38
The text was updated successfully, but these errors were encountered:
We could make the default value for -Keep to be 1 so that it would always keep the latest one?
The parameter Unused is meant to delete all the images that are unused without looking at new ones at all.
The main issue is when I run Remove-dcnImage with the 2 params I would expect it to apply per database, not to all images.
I have 10 images all for different databases. I run the remove command with the -unused -keep 1 and it removes 9 images. I would expect it to remove none because each image is for a different database.
We have 2 automated scripts one to create new images which we run every month, and one to remove the old images which we run every day.
The removal script original just did the below:
Remove-dcnImage-unused -keep 1
But we found that removes all unused images instead of per database. We changed the script to run the below instead:
Before submitting the bug
powershell -NoProfile
)Describe the bug
When running the command:
Remove-DcnImage -unused -keep 1
I would expect the command to remove unused images and keep the most recent image for each database. However, removes all unused and keeps the most recent image.
For example, I have 3 database images created on 1/7 and generate a new image for each database on 2/7. This gives me the below table:
When you run the above command it would remove all images, leaving only 1 image (ImageID 6). I would expect it to only remove the oldest image per database, leaving us with ImageID 4, 5, and 6.
Is this intended? Are you meant to specify the database when using
-unused -keep [x]
?I'm using dbaclone version:
0.10.38
The text was updated successfully, but these errors were encountered: