plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

Recovery cluster using same ClusterName

Open mrgionsi opened this issue 10 months ago • 1 comments

Hello dear,

Could you please help me understand why, for recovery, a different cluster name must be defined?

I was able to perform the action, but after that, changing the name also changes the k8s service name changes and all the application needs to be aligned again.

Is there a way to recover a cluster from backup, keeping the same cluster name?

mrgionsi avatar Jan 13 '26 13:01 mrgionsi

Hi @mrgionsi! I'm Dosu and I’m helping the plugin-barman-cloud team.

In CloudNativePG, recovery is designed to bootstrap a new cluster from a backup, not to perform an in-place restore on an existing cluster. This means you typically need to define a new cluster name for the recovery process. The main reasons are: Kubernetes resources like Services are named after the cluster, so changing the cluster name changes the service name, which impacts application connectivity. More importantly, CloudNativePG includes safety checks to prevent accidental data loss—if you try to recover using the same cluster name and storage, the operator will block the process to avoid overwriting existing data in the backup storage. There is an annotation (cnpg.io/skipEmptyWalArchiveCheck) that can bypass this safety check, but using it is strongly discouraged because it can lead to severe data loss and resource conflicts see docs.

The standard and recommended approach is to use a different cluster name for recovery, update your applications to point to the new service, and then, if needed, clean up the old resources. There is no supported or safe way to recover a cluster from backup while keeping the same cluster name and reusing the same resources.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

dosubot[bot] avatar Jan 13 '26 13:01 dosubot[bot]