Nexus 3 - Enhance clean up policy to move an asset to temp location before deleting

I have been tasked to create a new job that moves/copies the files that are in the process of being deleted to an secondary location, in the event that someone needs that file brought back.

So need to find any asset that is over X number of days, move/copy the file, and then delete from the blobstore. Then create a report of everything that was moved/copied. The report needs to be such that we know where it came from in the repository.

I was hoping someone may have something like this or similar that I didn’t have to create, not a groovy programmer, I am in the admin team.

I have been working with Nexus support, but this may be deeper that support can go

When files are deleted from repositories they aren’t immediately removed from blob storage, they are just marked as deleted. So recovery is still possible until a compact blobstore task is run. There’s some info on this at the end of this thread:

So you can hypothetically scan blob storage to find recently deleted files.

I’d advise you to use the compact blob store task to actually remove the soft deleted files, don’t change the contents of blob storage directly.

Thanks for this,

We are running a nightly compact job, so unless we change that to weekly, it still may catch us.

We can’t turn on any clean up for any of our production repos until we get this solution in place. Which is why I have been trying to figure out a useable solution