Manage Namespaces in Scheduled Backups
Portworx Backup 2.10.0 introduces namespace management capabilities that allow scheduled backups to continue gracefully when namespaces go missing or unavailable from the cluster. Instead of failing the entire backup, the system proceeds and creates scheduled backup with available namespaces and marks the backup as Partial Success. This feature improves backup resilience by ensuring your backup schedules remain active even when namespace availability changes.
In traditional backup scenarios, if any specified namespace is missing during a backup cycle, the entire backup operation fails. Namespace management in scheduled backups improves resilience and usability by:
- Continuing operations: backup proceeds with available namespaces when some are missing
- Transparent reporting: clear indication of which namespaces were unavailable
- Partial success status: backups are marked as
Partial Successinstead ofFailed - Schedule continuity: backup schedules remain active even with missing namespaces
The flexible namespace feature is designed to handle three key scenarios: when namespaces are missing at backup start, when multiple namespaces are specified in a single backup, and when backup schedules must remain active despite missing namespaces.
When a scheduled backup is created, there comes two scenarios:
-
If a namespace is missing at backup start, the backup continues with available namespaces and is marked as
Partial Success. The Portworx Backup web console displays the missing namespaces in the backup details and sends an alert. You can then investigate the root cause and either exclude the missing namespaces from the schedule or recreate them. -
There might be new namespaces created in the cluster after the backup start. These namespaces are not included in the current backup cycle. The user needs to manually include these namespaces by editing the schedule and will be picked up in the next backup cycle.
Prerequisites
- Portworx Backup 2.10.0 or later
- Stork version 25.5.0 or later
- Appropriate RBAC permissions for target namespaces
- Multiple namespaces specified in backup configuration
- Preexisting backup schedules with multiple namespaces included in the backup
Backup Behavior by Namespace State
| Scenario | Backup Status |
|---|---|
| Namespace(s) deleted before backup creation | Backup continues with available namespaces and results in partial success |
| Namespace(s) deleted during backup creation | Backup process will be failed and Backup status would be marked as Failed |
| Namespace(s) deleted after backup creation | Backup continues with available namespaces in the next backup cycle and results in partial success |
| Namespace added before/after backup creation | Namespaces are not picked up for backup and need to be added manually with Edit Schedule option. Newely added namespaces will be picked in the next backup cycle |
| Namespace added during backup creation | Namespaces are not picked up for in current backup cycle and need to be added manually with Edit Schedule option. These newely added namespaces will be picked in the next cycle. |
Exclude Deleted Namespaces from the Backup
Portworx Backup triggers an alert (email notification as well as alert in the Portworx Backup web console dashboard) after the backup completes and goes into Partial Success state because of missing namespaces.
-
From the email alert or alert displayed in the Portworx Backup web console, take the name of the backup that contains missing namespaces.
-
In the Portworx Backup web console, navigate to Portworx Backup Dashboard or All Clusters or the home page.
-
Search for the required backup in the Search by Backup Name & Labels.
-
Select Partial Success in the Filter by Status field. Adjust the Time Filter (Last 1 Week or Last 1 Month) to fetch the required backup.
-
Click on the details drop-down, you will see two options:
- Exclude from Schedule under Activity Info
- Edit Schedule under Backup Schedule
-
Click on Exclude from Schedule, you will see the following Alert info window:
The Alert info window displays the number of namespaces that are unavailable.
notePortworx Backup web console displays Alert info window with missing namespace list only for Portworx Backup 2.10.0 and above. If your Portworx Backup version is below 2.10.0 and Stork version is 25.5.0 or above, you need to check the list of missing namespaces in the respective backup Custom Resources.
-
Select all or the required namespaces you want to exclude from the scheduled backup and then click Exclude from Schedule.
The backup schedule is updated and the selected namespaces are excluded from the next backup cycle.
Add New Namspaces to the Backup
If there are new namespaces created in the cluster after the backup start, these namespaces are not included in the current backup cycle. The user needs to manually include these namespaces for the next backup cycle.
-
In the Portworx Backup web console, navigate to Clusters and then select your cluster.
-
Navigate to Schedules tab, search for backup schedule by name or labels.
-
Use three dot menu to right to it, and select Edit. You will see the following Edit Schedule window:
-
Click Add New Namespaces and select the required new namespaces you want to include in the backup schedule.
-
Click Add to Schedule and then click Update.
The backup schedule is updated and the selected namespaces are included in the next backup cycle.
You can also edit the Schedule from the Backup details under the Backups tab:
Once you click on the backup name, you will see Edit Schedule under Backup Schedule
Limitations
- If a namespace that is part of the backup is deleted during backup execution (volume or resource stages), the backup transitions to a failed state.
- Namespaces created after backup start you cannot manually include in the current backup cycle. They will be picked up in the next backup cycle after you add them to the Backup schedule.
- If a backup schedule targets only one namespace and it's deleted, the schedule will not trigger further backups.
- Flexible namespace backup schedule editing is not supported in the Portworx Backup web console for backup schedules defined with future namespace, namespace labels and VM backup schedules.
- If you created a backup schedule intially for a single namespace and later want to add additional namespaces to that schedule, you can't update the backup schedule; it will result in an error.