- This topic has 5 replies, 2 voices, and was last updated 1 year, 11 months ago by
Bob Adair.
-
AuthorPosts
-
February 18, 2021 at 7:08 pm #6095
Bob Adair
KeymasterWe have received some questions about how the various selection options in the “Add New Backup” wizard work, and how they work together to determine what will be included in a backup. I’m posting the answer here, and we will also be including it in the FAQ page.
The default setting when you first enter the “Add New Backup” wizard is to protect EVERYTHING. However, CloudCasa offers a variety of selection options to let you specify exactly what you want backed up, so it is important to understand how they work and interact.
If the “Full Cluster” option is chosen, CloudCasa will back up all resources in the cluster, including all namespace-scoped and cluster-scoped resources.
If the “Select Namespaces” option is chosen, only the selected namespaces will be backed up. Cluster-scoped resources will only be backed up if they are associated with selected namespace-scoped resources.
If the “Select Labels” option is selected, only resources with the specified key-value labels will be backed up. If multiple key-value labels are specified, the relationship between them is logical AND, meaning ALL listed labels need to be present and their values need to match. For example, if “owner:bob” and “env:production” are specified, then only resources with BOTH the labels “owner:bob” AND “env:production” will be backed up. This filtering applies to both namespace-scoped and cluster-scoped resources.
If “Select Namespaces” and “Select Labels” are BOTH selected, the filtering has a cumulative effect. Only resources that are both in one of the selected namespaces (or are associated with a resource that is, in the case of cluster-scoped resources) AND have the specified labels will be backed up.
Remember that the filtering applies to persistent volume snapshots as well!
If you have questions, please don’t hesitate to post them here or contact support!
October 5, 2021 at 4:01 pm #6112lkananowicz
MemberHi, how do I add multiple labels, do you need to separate them with semicolon? Or this multiple labels feature is not available in Free Plan?
Thanks,
LeonOctober 5, 2021 at 4:47 pm #6113Bob Adair
KeymasterHi Leon. You can definitely add multiple labels no matter what plan you are using! In any input field that is asking for tags or label selectors you can add multiple name:value pairs by separating them with spaces or semicolons. For example, you can enter “owner:bob; env:production” or “owner:bob env:production”. If you want to verify that the parser is doing what you expect, just click outside of the field and the pairs you’ve added will appear in separate icons underneath. You can also add or remove name:value pairs one a time in this way.
We should probably add a tooltip or help icon to the UI that explains this, so thanks for bringing it up!
October 5, 2021 at 6:52 pm #6114lkananowicz
MemberThanks for a quick answer, I tried with both semicolons and spaces but only last pair appears underneath.
Here are the pairs used: app:postgresql-de-master-production;app:postgresql-production
Maybe there is a problem with dashes?
October 5, 2021 at 8:02 pm #6115Bob Adair
KeymasterHi Leon. The problem is that since the name is the same for those two name-value pairs it is only accepting one. At the moment the matching relationship between multiple label selectors is always logical AND (e.g. match if app=postgres AND env=production), so in that case allowing multiple labels with the same name and different values would make no sense. I assume what you want is a logical OR where it will match if app=postgresql-de-master-production OR app=postgresql-production. Unfortunately, we don’t support that today, although we do have an enhancement request open for it. In the meantime, I’d recommend creating two different backup definitions instead instead.
October 6, 2021 at 12:34 pm #6116lkananowicz
MemberHi Bob, ok, thanks for a detailed explanation. Yes, I agree, different backup definitions should solve this issue.
-
AuthorPosts
- You must be logged in to reply to this topic.