In my case a snapshot repository had grown so big that tasks like the Snapshot Remover took more than a week.
So I decided to replace the repo by an empty one.
In order to keep access to the old stuff I decided to rename the repo and add it to the repo group. So external read access is no issue.
That way all teams deploy now to the new empty repo without configuration change. But still can download all previously available artifacts.
To do so I had to connect to the orient db as described in this article: https://support.sonatype.com/hc/en-us/articles/235816228-Relocating-Blob-Stores
Once connected to "config" db I updated the repository name:
update repository set repository_name='new-name' where repository_name='old-name'
disconnect
and connected the same way to the "component" db:
connect
plocal:../sonatype-work/nexus3/db/
component admin admin
Review the buckets:
select from bucket
and update:
update bucket set repository_name='new-name' where repository_name='old-name'
exit
Then I replaced in all *.properties files in the blob storage directory the string
@Bucket.repo-name=old-name by @Bucket.repo-name=new-name
Then I started Nexus and in Nexus UI updated repository groups and scheduled tasks and so on which referenced the old name.
Then I created the new repo...
All works fine but please note that my renamed repo is "read-only". Noboday uploads to it anymore.
So I can't tell if that would work.
Would be great if Nexus3 would support renaming like Nexus2 did.