Question about cluster- and namespace resource inclusion #7797
-
Hi all, what I want to get done here is to create a backup that includes everything from a namespace, e.g. 'myns'. I tried this Backup CR :
This creates a Backup that backs up everything that matches the label, however I was expecting that this backup would back up :
Splitting this into two backups sort of gives my what I want : the namespace with it's resources, and the corresponding ( NOTE : I know that after restoring a namespace backup, deleting the operator CSV's will trigger a reinstall, OpenShifts OADP operator has Velero 1.12.4. Searching the web, I found #5838 Maybe I get it conceptually wrong, and I'm hoping to get some guidance here. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
There have been recent developments around this. See #7492 Please check if that satisfies your requirements. |
Beta Was this translation helpful? Give feedback.
-
For your scenario, just creating a backup including the namespace should work. velero/pkg/backup/actions/service_account_action.go Lines 92 to 118 in cdd5a4f
|
Beta Was this translation helpful? Give feedback.
And yes ! My issue is resolved. User error.
Because I created the Backup CR using
I automatically used that in the Restore CR too.. which caused the clusterscoped resources not to be restored.
Removing the 'includedNamespaces' directive from the Restore CR caused everything to restore fine !
Thanks Kaovilai and Blackpiglet for your help !