gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

Cleanup GHES Archives

Open dylan-smith opened this issue 3 years ago • 5 comments

When migrating from GHES we ask GHES to generate migration archives which we then download and upload to Azure. However, we don't explicitly tell GHES to delete the archives when we're done with them, which can potentially cause disk space issues on the GHES server.

I believe GHES will automatically clean them up after 7 days, however we could have the CLI call the appropriate API's to clean them up as soon as we are done with them (i.e. after we download them).

dylan-smith avatar Aug 17 '22 15:08 dylan-smith

We might want to include an option to not delete them immediately also. This option would be useful when troubleshooting.

robandpdx avatar Aug 18 '22 19:08 robandpdx

Does it also make sense to include an option to remove the archives from the Azure blob storage when the migration succeeds? So a successful migration doesn't leave any remanent temp files anywhere.

This was suggested by CarMax.

thedave42 avatar Sep 09 '22 17:09 thedave42

Does it also make sense to include an option to remove the archives from the Azure blob storage when the migration succeeds? So a successful migration doesn't leave any remanent temp files anywhere.

This was suggested by CarMax.

For the azure blobs our thinking was that the customer could manage the lifetime of those blobs themselves when they create/configure the azure storage account. E.g. in Azure you could setup a rule like this to delete blobs after 48 hours:

image

image

dylan-smith avatar Sep 09 '22 17:09 dylan-smith

I could see the value in having our CLI delete it as soon as we know we are finished with it though. cc @roferg and @timrogers for more opinions.

dylan-smith avatar Sep 09 '22 17:09 dylan-smith

I think priority 1 is cleaning up the archive on the GHES disc first. For blob storage we could look at automating the deletion as well if the migration succeeds. However, since there are was to manage that in Azure I think it's a lower priority. The customer can also delete the blob account after the migrations are completed.

roferg avatar Sep 09 '22 20:09 roferg