If you need to recreate a bucket but don’t know the name of the bucket or the domain, presuming the bucket still has a delete marker, you can use the contextid in the error from the castor.log like this.
Here is the error.
Context (uuid=8a335bcfc042610ac1777184727f0a86) has been recursively deleted but contains non-deletable content. See log for more detail.
Here is how you hit Swarm directly (not through Content Gateway) to find the headers for that context. In the case of recovering a bucket, you will want the information from Castor-System-Path.