dbaclone icon indicating copy to clipboard operation
dbaclone copied to clipboard

Add "label" information to images for categorization

Open blitzmann opened this issue 2 years ago • 0 comments

When creating an image, I think it would be useful if you could create it using a tag or a label that can label that image as being part of a certain process (or any other metadata you want to store about the image).

For example, if we have a scheduled task that images MyDatabase from the production server weekly. We use Remove-DcnImage -Unused -Keep 4 -Database MyDatabase to remove any images that are older than 4 weeks and aren't being used. These weekly ones are the ones we use for general features

However, I would also like to create a Daily images at midnight of the same database that would only be kept around if no clones are active for it. This is in case we need more recent data for dev work / troubleshooting.

For that one, I would run Remove-DcnImage -Unused -Database MyDatabase

The problem is that there is nothing to differentiate the weekly images from the daily images, so running the second Remove- command will remove weekly ones as well.

If we had labels that were issues when creating the weekly / daily images, I would be able to have the remove commands clean up backed on those labels

Remove-DcnImage -Unused -Database MyDatabase -Label daily Remove-DcnImage -Unused -Keep 4 -Database MyDatabase -Label Weekly

blitzmann avatar May 06 '22 19:05 blitzmann