From 4f2d809dfdd25083fd3c24406e5e9e5fc33707ef Mon Sep 17 00:00:00 2001 From: Sanjay Prabhakar Date: Fri, 12 Jun 2026 18:49:18 +0100 Subject: [PATCH 1/4] [minor] apps pvc backup and restore optional --- python/src/mas/cli/backup/app.py | 34 +++++++++++++++++++++++ python/src/mas/cli/backup/argParser.py | 32 +++++++++++++++++++++ python/src/mas/cli/restore/app.py | 34 +++++++++++++++++++++++ python/src/mas/cli/restore/argParser.py | 32 +++++++++++++++++++++ tekton/src/params/backup.yml.j2 | 20 +++++++++++++ tekton/src/pipelines/mas-backup.yml.j2 | 4 +++ tekton/src/pipelines/mas-restore.yml.j2 | 8 ++++-- tekton/src/tasks/suite-app-backup.yml.j2 | 8 ++++++ tekton/src/tasks/suite-app-restore.yml.j2 | 22 ++++++++++----- 9 files changed, 185 insertions(+), 9 deletions(-) diff --git a/python/src/mas/cli/backup/app.py b/python/src/mas/cli/backup/app.py index 3f7dff7e6b0..4a86a4f6d90 100644 --- a/python/src/mas/cli/backup/app.py +++ b/python/src/mas/cli/backup/app.py @@ -76,6 +76,7 @@ def backup(self, argv): # Manage App Backup "manage_workspace_id", "backup_manage_app", + "backup_manage_include_pvc", "backup_manage_db", "manage_db2_namespace", "manage_db2_instance_name", @@ -84,6 +85,7 @@ def backup(self, argv): # Facilities App Backup "facilities_workspace_id", "backup_facilities_app", + "backup_facilities_include_pvc", "backup_facilities_db", "facilities_db2_namespace", "facilities_db2_instance_name", @@ -187,6 +189,7 @@ def backup(self, argv): self.printH2("Manage Application Backup") self.printSummary("Backup Manage App", "Yes") self.printSummary("Workspace ID", self.getParam("manage_workspace_id")) + self.printSummary("Include PVC Backup", "Yes" if self.getParam("backup_manage_include_pvc") == "true" else "No") self.printSummary("Backup Manage incluster Db2 Database", "Yes" if self.getParam("backup_manage_db") == "true" else "No") if self.getParam("backup_manage_db") == "true": self.printSummary("Db2 Namespace", self.getParam("manage_db2_namespace")) @@ -197,6 +200,7 @@ def backup(self, argv): self.printH2("Facilities Application Backup") self.printSummary("Backup Facilities App", "Yes") self.printSummary("Workspace ID", self.getParam("facilities_workspace_id")) + self.printSummary("Include PVC Backup", "Yes" if self.getParam("backup_facilities_include_pvc") == "true" else "No") self.printSummary("Backup Facilities incluster Db2 Database", "Yes" if self.getParam("backup_facilities_db") == "true" else "No") if self.getParam("backup_facilities_db") == "true": self.printSummary("Db2 Namespace", self.getParam("facilities_db2_namespace")) @@ -571,6 +575,21 @@ def promptForManageAppBackup(self) -> None: workspaceId = self.promptForString("Enter Manage workspace ID") self.setParam("manage_workspace_id", workspaceId) + # Ask about PVC backup + self.printH2("Manage PVC Backup") + self.printDescription( + [ + "The Manage application uses persistent volumes that can be backed up.", + "This will include PVC data in the backup.", + ] + ) + backupPvc = self.yesOrNo("Do you want to include PVC backup for Manage") + + if backupPvc: + self.setParam("backup_manage_include_pvc", "true") + else: + self.setParam("backup_manage_include_pvc", "false") + # Ask about DB2 backup self.printH2("Manage Database Backup") self.printDescription( @@ -657,6 +676,21 @@ def promptForFacilitiesAppBackup(self) -> None: workspaceId = self.promptForString("Enter Facilities workspace ID") self.setParam("facilities_workspace_id", workspaceId) + # Ask about PVC backup + self.printH2("Facilities PVC Backup") + self.printDescription( + [ + "The Facilities application uses persistent volumes that can be backed up.", + "This will include PVC data in the backup.", + ] + ) + backupPvc = self.yesOrNo("Do you want to include PVC backup for Facilities") + + if backupPvc: + self.setParam("backup_facilities_include_pvc", "true") + else: + self.setParam("backup_facilities_include_pvc", "false") + # Ask about DB2 backup self.printH2("Facilities Database Backup") self.printDescription( diff --git a/python/src/mas/cli/backup/argParser.py b/python/src/mas/cli/backup/argParser.py index 3cfff33f3f5..a29809d2e4b 100644 --- a/python/src/mas/cli/backup/argParser.py +++ b/python/src/mas/cli/backup/argParser.py @@ -69,6 +69,22 @@ "--backup-manage-app", dest="backup_manage_app", required=False, action="store_const", const="true", help="Backup the Manage application" ) manageAppArgGroup.add_argument("--manage-workspace-id", dest="manage_workspace_id", required=False, help="Manage workspace ID") +manageAppArgGroup.add_argument( + "--backup-manage-include-pvc", + dest="backup_manage_include_pvc", + required=False, + action="store_const", + const="true", + help="Include PVC backup for Manage application", +) +manageAppArgGroup.add_argument( + "--backup-manage-exclude-pvc", + dest="backup_manage_include_pvc", + required=False, + action="store_const", + const="false", + help="Exclude PVC backup for Manage application", +) manageAppArgGroup.add_argument( "--backup-manage-db", dest="backup_manage_db", required=False, action="store_const", const="true", help="Backup the Manage application database (Db2)" ) @@ -87,6 +103,22 @@ "--backup-facilities-app", dest="backup_facilities_app", required=False, action="store_const", const="true", help="Backup the Facilities application" ) facilitiesAppArgGroup.add_argument("--facilities-workspace-id", dest="facilities_workspace_id", required=False, help="Facilities workspace ID") +facilitiesAppArgGroup.add_argument( + "--backup-facilities-include-pvc", + dest="backup_facilities_include_pvc", + required=False, + action="store_const", + const="true", + help="Include PVC backup for Facilities application", +) +facilitiesAppArgGroup.add_argument( + "--backup-facilities-exclude-pvc", + dest="backup_facilities_include_pvc", + required=False, + action="store_const", + const="false", + help="Exclude PVC backup for Facilities application", +) facilitiesAppArgGroup.add_argument( "--backup-facilities-db", dest="backup_facilities_db", diff --git a/python/src/mas/cli/restore/app.py b/python/src/mas/cli/restore/app.py index 9c5c2cda703..b695d680e6b 100644 --- a/python/src/mas/cli/restore/app.py +++ b/python/src/mas/cli/restore/app.py @@ -87,6 +87,7 @@ def restore(self, argv): "artifactory_repository", # Manage App Restore "restore_manage_app", + "restore_manage_include_pvc", "restore_manage_db", "manage_app_override_storageclass", "manage_app_storage_class_rwx", @@ -96,6 +97,7 @@ def restore(self, argv): "manage_db_storage_class_rwo", # Facilities App Restore "restore_facilities_app", + "restore_facilities_include_pvc", "restore_facilities_db", "facilities_app_override_storageclass", "facilities_app_storage_class_rwx", @@ -229,11 +231,13 @@ def restore(self, argv): if self.getParam("restore_manage_app") == "true": self.printH2("Manage Application Restore") self.printSummary("Restore Manage App", "Yes") + self.printSummary("Include PVC Restore", "Yes" if self.getParam("restore_manage_include_pvc") == "true" else "No") self.printSummary("Restore Manage incluster Db2 Database", "Yes" if self.getParam("restore_manage_db") == "true" else "No") if self.getParam("restore_facilities_app") == "true": self.printH2("Facilities Application Restore") self.printSummary("Restore Facilities App", "Yes") + self.printSummary("Include PVC Restore", "Yes" if self.getParam("restore_facilities_include_pvc") == "true" else "No") self.printSummary("Restore Facilities incluster Db2 Database", "Yes" if self.getParam("restore_facilities_db") == "true" else "No") if self.getParam("sls_domain") is not None and self.getParam("sls_domain") != "": @@ -626,6 +630,21 @@ def promptForManageAppRestore(self) -> None: if restoreManageApp: self.setParam("restore_manage_app", "true") + # Ask about PVC restore + self.printH2("Manage PVC Restore") + self.printDescription( + [ + "The Manage application uses persistent volumes that can be restored.", + "This will restore PVC data from the backup.", + ] + ) + restorePvc = self.yesOrNo("Do you want to include PVC restore for Manage") + + if restorePvc: + self.setParam("restore_manage_include_pvc", "true") + else: + self.setParam("restore_manage_include_pvc", "false") + # Ask about DB2 restore self.printH2("Manage Database Restore") self.printDescription( @@ -809,6 +828,21 @@ def promptForFacilitiesAppRestore(self) -> None: if restoreFacilitiesApp: self.setParam("restore_facilities_app", "true") + # Ask about PVC restore + self.printH2("Facilities PVC Restore") + self.printDescription( + [ + "The Facilities application uses persistent volumes that can be restored.", + "This will restore PVC data from the backup.", + ] + ) + restorePvc = self.yesOrNo("Do you want to include PVC restore for Facilities") + + if restorePvc: + self.setParam("restore_facilities_include_pvc", "true") + else: + self.setParam("restore_facilities_include_pvc", "false") + # Ask about DB2 restore self.printH2("Facilities Database Restore") self.printDescription( diff --git a/python/src/mas/cli/restore/argParser.py b/python/src/mas/cli/restore/argParser.py index 2ef9ae17f44..d5507d623b9 100644 --- a/python/src/mas/cli/restore/argParser.py +++ b/python/src/mas/cli/restore/argParser.py @@ -151,6 +151,22 @@ manageAppArgGroup.add_argument( "--restore-manage-app", dest="restore_manage_app", required=False, action="store_const", const="true", help="Restore the Manage application" ) +manageAppArgGroup.add_argument( + "--restore-manage-include-pvc", + dest="restore_manage_include_pvc", + required=False, + action="store_const", + const="true", + help="Include PVC restore for Manage application", +) +manageAppArgGroup.add_argument( + "--restore-manage-exclude-pvc", + dest="restore_manage_include_pvc", + required=False, + action="store_const", + const="false", + help="Exclude PVC restore for Manage application", +) manageAppArgGroup.add_argument( "--restore-manage-db", dest="restore_manage_db", required=False, action="store_const", const="true", help="Restore the Manage application database (Db2)" ) @@ -191,6 +207,22 @@ facilitiesAppArgGroup.add_argument( "--restore-facilities-app", dest="restore_facilities_app", required=False, action="store_const", const="true", help="Restore the Facilities application" ) +facilitiesAppArgGroup.add_argument( + "--restore-facilities-include-pvc", + dest="restore_facilities_include_pvc", + required=False, + action="store_const", + const="true", + help="Include PVC restore for Facilities application", +) +facilitiesAppArgGroup.add_argument( + "--restore-facilities-exclude-pvc", + dest="restore_facilities_include_pvc", + required=False, + action="store_const", + const="false", + help="Exclude PVC restore for Facilities application", +) facilitiesAppArgGroup.add_argument( "--restore-facilities-db", dest="restore_facilities_db", diff --git a/tekton/src/params/backup.yml.j2 b/tekton/src/params/backup.yml.j2 index 0fa29c88dc0..4b15f75f998 100644 --- a/tekton/src/params/backup.yml.j2 +++ b/tekton/src/params/backup.yml.j2 @@ -248,6 +248,11 @@ description: Whether to backup the Manage application (true/false) default: "false" +- name: backup_manage_include_pvc + type: string + description: Whether to backup the Manage PVC (true/false) + default: "true" + - name: backup_manage_db type: string description: Whether to backup the Manage database (Db2) (true/false) @@ -258,6 +263,11 @@ description: Whether to restore the Manage application (true/false) default: "false" +- name: restore_manage_include_pvc + type: string + description: Whether to restore the Manage PVC (true/false) + default: "true" + - name: restore_manage_db type: string description: Whether to restore the Manage database (Db2) (true/false) @@ -353,6 +363,11 @@ description: Whether to backup the Facilities application (true/false) default: "false" +- name: backup_facilities_include_pvc + type: string + description: Whether to backup the Facilities PVC (true/false) + default: "true" + - name: backup_facilities_db type: string description: Whether to backup the Facilities database (Db2) (true/false) @@ -363,6 +378,11 @@ description: Whether to restore the Facilities application (true/false) default: "false" +- name: restore_facilities_include_pvc + type: string + description: Whether to restore the Facilities PVC (true/false) + default: "true" + - name: restore_facilities_db type: string description: Whether to restore the Facilities database (Db2) (true/false) diff --git a/tekton/src/pipelines/mas-backup.yml.j2 b/tekton/src/pipelines/mas-backup.yml.j2 index 295b6d778e7..daa0675b9bd 100644 --- a/tekton/src/pipelines/mas-backup.yml.j2 +++ b/tekton/src/pipelines/mas-backup.yml.j2 @@ -300,6 +300,8 @@ spec: value: /workspace/backups - name: mas_app_backup_version value: $(params.backup_version) + - name: backup_app_include_pvc + value: $(params.backup_manage_include_pvc) taskRef: kind: Task @@ -380,6 +382,8 @@ spec: value: /workspace/backups - name: mas_app_backup_version value: $(params.backup_version) + - name: backup_app_include_pvc + value: $(params.backup_facilities_include_pvc) taskRef: kind: Task diff --git a/tekton/src/pipelines/mas-restore.yml.j2 b/tekton/src/pipelines/mas-restore.yml.j2 index b04bff332c7..7a7f4e63a23 100644 --- a/tekton/src/pipelines/mas-restore.yml.j2 +++ b/tekton/src/pipelines/mas-restore.yml.j2 @@ -463,12 +463,14 @@ spec: value: /workspace/backups - name: mas_app_backup_version value: $(params.restore_version) + - name: restore_app_include_pvc + value: $(params.restore_manage_include_pvc) - name: override_storageclass value: $(params.manage_app_override_storageclass) - - name: manage_custom_storage_class_rwx + - name: custom_storage_class_rwx value: $(params.manage_app_storage_class_rwx) - - name: manage_custom_storage_class_rwo + - name: custom_storage_class_rwo value: $(params.manage_app_storage_class_rwo) taskRef: @@ -540,6 +542,8 @@ spec: value: /workspace/backups - name: mas_app_backup_version value: $(params.restore_version) + - name: restore_app_include_pvc + value: $(params.restore_facilities_include_pvc) - name: override_storageclass value: $(params.facilities_app_override_storageclass) diff --git a/tekton/src/tasks/suite-app-backup.yml.j2 b/tekton/src/tasks/suite-app-backup.yml.j2 index 3629702e2c0..c571aeab290 100644 --- a/tekton/src/tasks/suite-app-backup.yml.j2 +++ b/tekton/src/tasks/suite-app-backup.yml.j2 @@ -31,6 +31,11 @@ spec: type: string description: Version/timestamp for the MAS app backup default: "" + + - name: backup_app_include_pvc + type: string + description: Whether to include PVC in backup + default: "true" stepTemplate: env: @@ -52,6 +57,9 @@ spec: - name: MAS_APP_BACKUP_VERSION value: $(params.mas_app_backup_version) + - name: MAS_APP_BACKUP_INCLUDE_PVC + value: $(params.backup_app_include_pvc) + steps: - name: suite-app-backup command: diff --git a/tekton/src/tasks/suite-app-restore.yml.j2 b/tekton/src/tasks/suite-app-restore.yml.j2 index 546c47c01a2..7da4fb229ac 100644 --- a/tekton/src/tasks/suite-app-restore.yml.j2 +++ b/tekton/src/tasks/suite-app-restore.yml.j2 @@ -26,15 +26,20 @@ spec: type: string description: Version/timestamp for the MAS app backup default: "" + + - name: restore_app_include_pvc + type: string + description: Whether to include PVC in backup + default: "true" - name: override_storageclass type: string description: Override App PVC storageclass during restore default: "false" - - name: manage_custom_storage_class_rwx + - name: custom_storage_class_rwx type: string default: "" - - name: manage_custom_storage_class_rwo + - name: custom_storage_class_rwo type: string default: "" @@ -54,15 +59,18 @@ spec: - name: MAS_APP_BACKUP_VERSION value: $(params.mas_app_backup_version) - + + - name: MAS_APP_RESTORE_INCLUDE_PVC + value: $(params.restore_app_include_pvc) + - name: OVERRIDE_STORAGECLASS value: $(params.override_storageclass) # Manage specific - - name: MANAGE_CUSTOM_STORAGE_CLASS_RWX - value: $(params.manage_custom_storage_class_rwx) - - name: MANAGE_CUSTOM_STORAGE_CLASS_RWO - value: $(params.manage_custom_storage_class_rwo) + - name: MAS_APP_CUSTOM_STORAGE_CLASS_RWX + value: $(params.custom_storage_class_rwx) + - name: MAS_APP_CUSTOM_STORAGE_CLASS_RWO + value: $(params.custom_storage_class_rwo) steps: - name: suite-app-restore From 91cc10bebb3d9c713b34da20349fab54efe7a90d Mon Sep 17 00:00:00 2001 From: Sanjay Prabhakar Date: Wed, 17 Jun 2026 13:43:24 +0100 Subject: [PATCH 2/4] Update mas-restore.yml.j2 --- tekton/src/pipelines/mas-restore.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tekton/src/pipelines/mas-restore.yml.j2 b/tekton/src/pipelines/mas-restore.yml.j2 index 7a7f4e63a23..201b644e870 100644 --- a/tekton/src/pipelines/mas-restore.yml.j2 +++ b/tekton/src/pipelines/mas-restore.yml.j2 @@ -547,9 +547,9 @@ spec: - name: override_storageclass value: $(params.facilities_app_override_storageclass) - - name: facilities_custom_storage_class_rwx + - name: custom_storage_class_rwx value: $(params.facilities_app_storage_class_rwx) - - name: facilities_custom_storage_class_rwo + - name: custom_storage_class_rwo value: $(params.facilities_app_storage_class_rwo) taskRef: From 57b7762b5405fe42cf5435feaea7235bbf8eb48a Mon Sep 17 00:00:00 2001 From: Sanjay Prabhakar Date: Wed, 17 Jun 2026 16:44:13 +0100 Subject: [PATCH 3/4] rebuild From 27bfa4d16ea2d9ece9166d29d69ce3d4ca51b1d0 Mon Sep 17 00:00:00 2001 From: Sanjay Prabhakar Date: Thu, 18 Jun 2026 11:14:53 +0100 Subject: [PATCH 4/4] [patch] updates to backup and restore commands docs and guides --- docs/commands/backup.md | 49 +++++++++++++++++++++++++++++++--- docs/commands/restore.md | 50 ++++++++++++++++++++++++++++++----- docs/guides/backup-restore.md | 3 +-- docs/guides/backup.md | 17 +++++++----- docs/guides/restore.md | 8 ++++-- 5 files changed, 107 insertions(+), 20 deletions(-) diff --git a/docs/commands/backup.md b/docs/commands/backup.md index c7e843bac1a..b2ddf5c20e3 100644 --- a/docs/commands/backup.md +++ b/docs/commands/backup.md @@ -12,10 +12,11 @@ usage: mas backup [-i MAS_INSTANCE_ID] [--backup-version BACKUP_VERSION] [--clean-backup] [--no-clean-backup] [--upload-backup] [--aws-access-key-id AWS_ACCESS_KEY_ID] [--aws-secret-access-key AWS_SECRET_ACCESS_KEY] [--s3-bucket-name S3_BUCKET_NAME] [--s3-region S3_REGION] [--artifactory-url ARTIFACTORY_URL] [--artifactory-repository ARTIFACTORY_REPOSITORY] - [--backup-manage-app] [--manage-workspace-id MANAGE_WORKSPACE_ID] [--backup-manage-db] + [--backup-manage-app] [--backup-manage-include-pvc] [--backup-manage-exclude-pvc] [--manage-workspace-id MANAGE_WORKSPACE_ID] [--backup-manage-db] [--manage-db2-namespace MANAGE_DB2_NAMESPACE] [--manage-db2-instance-name MANAGE_DB2_INSTANCE_NAME] [--manage-db2-backup-type {offline,online}] - [--backup-facilities-app] [--facilities-workspace-id FACILITIES_WORKSPACE_ID] [--backup-facilities-db] + [--backup-facilities-app] [--backup-facilities-include-pvc] [--backup-facilities-exclude-pvc] + [--facilities-workspace-id FACILITIES_WORKSPACE_ID] [--backup-facilities-db] [--facilities-db2-namespace FACILITIES_DB2_NAMESPACE] [--facilities-db2-instance-name FACILITIES_DB2_INSTANCE_NAME] [--facilities-db2-backup-type {offline,online}] [--include-sls] [--exclude-sls] [--include-mongo] [--exclude-mongo] @@ -65,6 +66,10 @@ Manage Application Backup: --backup-manage-app Backup the Manage application --manage-workspace-id MANAGE_WORKSPACE_ID Manage workspace ID + --backup-manage-include-pvc + Include PVC backup for Manage application + --backup-manage-exclude-pvc + Exclude PVC backup for Manage application --backup-manage-db Backup the Manage application database (Db2) --manage-db2-namespace MANAGE_DB2_NAMESPACE Manage Db2 namespace (default: db2u) @@ -78,6 +83,10 @@ Facilities Application Backup: Backup the Facilities application --facilities-workspace-id FACILITIES_WORKSPACE_ID Facilities workspace ID + --backup-facilities-include-pvc + Include PVC backup for Facilities application + --backup-facilities-exclude-pvc + Exclude PVC backup for Facilities application --backup-facilities-db Backup the Facilities application database (Db2) --facilities-db2-namespace FACILITIES_DB2_NAMESPACE @@ -255,6 +264,18 @@ mas backup \ --no-confirm ``` +### Backup with Manage Application excluding PVCs +Backup the Manage application including persistent volume data: + +```bash +mas backup \ + --instance-id inst1 \ + --backup-manage-app \ + --manage-workspace-id masdev \ + --backup-manage-exclude-pvc \ + --no-confirm +``` + ### Backup with Manage Application Only (No Database) Backup the Manage application without backing up its database: @@ -281,6 +302,18 @@ mas backup \ --no-confirm ``` +### Backup with Facilities Application excluding PVCs +Backup the Facilities application including persistent volume data: + +```bash +mas backup \ + --instance-id inst1 \ + --backup-facilities-app \ + --facilities-workspace-id masdev \ + --backup-facilities-exclude-pvc \ + --no-confirm +``` + ### Backup with Facilities Application Only (No Database) Backup the Facilities application without backing up its database: @@ -336,7 +369,8 @@ Two upload destinations are supported: ### Manage Application Backup The backup command can optionally include the Manage application and its Db2 database: -- **Manage Application**: Backs up the Manage namespace resources and persistent volume data +- **Manage Application**: Backs up the Manage namespace resources +- **Manage PVC Backup**: Use `--backup-manage-include-pvc` or `--backup-manage-exclude-pvc` to include/exclude persistent volume data in the backup - **Manage Database**: Backs up the Db2 database associated with the Manage workspace - **Offline backup**: Database is unavailable during backup (required for circular logging) - **Online backup**: Database remains available during backup (requires archive logging) @@ -344,6 +378,15 @@ The backup command can optionally include the Manage application and its Db2 dat !!! note If your Db2 instance uses circular logging (default), you must use offline backup type. +### Facilities Application Backup +The backup command can optionally include the Facilities application and its Db2 database: + +- **Facilities Application**: Backs up the Facilities namespace resources +- **Facilities PVC Backup**: Use `--backup-facilities-include-pvc` or `--backup-facilities-exclude-pvc` to include/exclude persistent volume data in the backup +- **Facilities Database**: Backs up the Db2 database associated with the Facilities workspace + - **Offline backup**: Database is unavailable during backup (required for circular logging) + - **Online backup**: Database remains available during backup (requires archive logging) + ### Interactive Mode When running without `--instance-id`, the command enters interactive mode and will prompt for: diff --git a/docs/commands/restore.md b/docs/commands/restore.md index ff0bf97d666..e062e4df3b0 100644 --- a/docs/commands/restore.md +++ b/docs/commands/restore.md @@ -21,11 +21,13 @@ usage: mas restore [-i MAS_INSTANCE_ID] [--restore-version RESTORE_VERSION] [--sls-domain SLS_DOMAIN] [--ibm-entitlement-key IBM_ENTITLEMENT_KEY] [--contact-email DRO_CONTACT_EMAIL] [--contact-firstname DRO_CONTACT_FIRSTNAME] [--contact-lastname DRO_CONTACT_LASTNAME] [--dro-namespace DRO_NAMESPACE] [--override-mongodb-storageclass] [--mongodb-storageclass-name MONGODB_STORAGECLASS_NAME] - [--restore-manage-app] [--restore-manage-db] [--override-manage-app-storageclass] + [--restore-manage-app] [--restore-manage-include-pvc] [--restore-manage-exclude-pvc] + [--restore-manage-db] [--override-manage-app-storageclass] [--manage-app-storage-class-rwx MANAGE_APP_STORAGE_CLASS_RWX] [--manage-app-storage-class-rwo MANAGE_APP_STORAGE_CLASS_RWO] [--override-manage-db-storageclass] [--manage-db-storage-class-rwx MANAGE_DB_STORAGE_CLASS_RWX] [--manage-db-storage-class-rwo MANAGE_DB_STORAGE_CLASS_RWO] - [--restore-facilities-app] [--restore-facilities-db] [--override-facilities-app-storageclass] + [--restore-facilities-app] [--restore-facilities-include-pvc] [--restore-facilities-exclude-pvc] + [--restore-facilities-db] [--override-facilities-app-storageclass] [--facilities-app-storage-class-rwx FACILITIES_APP_STORAGE_CLASS_RWX] [--facilities-app-storage-class-rwo FACILITIES_APP_STORAGE_CLASS_RWO] [--override-facilities-db-storageclass] [--facilities-db-storage-class-rwx FACILITIES_DB_STORAGE_CLASS_RWX] [--facilities-db-storage-class-rwo FACILITIES_DB_STORAGE_CLASS_RWO] @@ -121,7 +123,11 @@ MongoDB Storage Class Override: MongoDB storage class name (ReadWriteOnce). If not specified, cluster default will be used. Manage Application Restore: - --restore-manage-app Restore the Manage application including namespace resources and persistent volume data + --restore-manage-app Restore the Manage application including namespace resources + --restore-manage-include-pvc + Include PVC restore for Manage application + --restore-manage-exclude-pvc + Exclude PVC restore for Manage application --restore-manage-db Restore the Manage incluster Db2 database --override-manage-app-storageclass Override storage class for Manage application persistent volumes @@ -138,7 +144,11 @@ Manage Application Restore: Facilities Application Restore: --restore-facilities-app - Restore the Facilities application including namespace resources and persistent volume data + Restore the Facilities application including namespace resources + --restore-facilities-include-pvc + Include PVC restore for Facilities application + --restore-facilities-exclude-pvc + Exclude PVC restore for Facilities application --restore-facilities-db Restore the Facilities incluster Db2 database --override-facilities-app-storageclass @@ -354,6 +364,18 @@ mas restore \ --no-confirm ``` +### Restore with Manage Application Excluding PVCs +Restore the Manage application including persistent volume data: + +```bash +mas restore \ + --instance-id inst1 \ + --restore-version 20260117-191701 \ + --restore-manage-app \ + --restore-manage-exclude-pvc \ + --no-confirm +``` + ### Restore with Manage Application and Database Restore both the Manage application and its incluster Db2 database: @@ -395,6 +417,18 @@ mas restore \ --no-confirm ``` +### Restore with Facilities Application Excluding PVCs +Restore the Facilities application including persistent volume data: + +```bash +mas restore \ + --instance-id inst1 \ + --restore-version 20260117-191701 \ + --restore-facilities-app \ + --restore-facilities-exclude-pvc \ + --no-confirm +``` + ### Restore with Facilities Application and Database Restore both the Facilities application and its incluster Db2 database: @@ -550,7 +584,8 @@ This is particularly useful for: ### Manage Application Restore The restore process can now restore the Manage application in addition to the MAS Suite: -- **Manage Application**: Use `--restore-manage-app` to restore Manage namespace resources and persistent volume data +- **Manage Application**: Use `--restore-manage-app` to restore Manage namespace resources +- **Manage PVC Restore**: Use `--restore-manage-include-pvc` or `--restore-manage-exclude-pvc` to restore persistent volume data - **Manage Database**: Use `--restore-manage-db` to restore the incluster Db2 database associated with the Manage workspace - **Storage Class Overrides**: - Use `--override-manage-app-storageclass` to override Manage application storage classes, then specify `--manage-app-storage-class-rwx` and `--manage-app-storage-class-rwo` @@ -559,13 +594,15 @@ The restore process can now restore the Manage application in addition to the MA !!! note - Manage database restore is an offline operation - the Manage application will be unavailable during the restore - The restore process handles both the application resources and the database data + - PVC restore is optional and controlled by the `--restore-manage-include-pvc` or `--restore-manage-exclude-pvc` flag - Storage class overrides are useful when restoring to clusters with different storage infrastructure - A single RWX and RWO storage class is applied across all Db2 persistent volumes (meta, data, backup, logs, temp) ### Facilities Application Restore The restore process can restore the Facilities application in addition to the MAS Suite: -- **Facilities Application**: Use `--restore-facilities-app` to restore Facilities namespace resources and persistent volume data +- **Facilities Application**: Use `--restore-facilities-app` to restore Facilities namespace resources +- **Facilities PVC Restore**: Use `--restore-facilities-include-pvc` or `--restore-facilities-exclude-pvc` to restore persistent volume data - **Facilities Database**: Use `--restore-facilities-db` to restore the incluster Db2 database associated with the Facilities workspace - **Storage Class Overrides**: - Use `--override-facilities-app-storageclass` to override Facilities application storage classes, then specify `--facilities-app-storage-class-rwx` and `--facilities-app-storage-class-rwo` @@ -574,6 +611,7 @@ The restore process can restore the Facilities application in addition to the MA !!! note - Facilities database restore is an offline operation - the Facilities application will be unavailable during the restore - The restore process handles both the application resources and the database data + - PVC restore is optional and controlled by the `--restore-facilities-include-pvc` or `--restore-facilities-exclude-pvc`flag - Storage class overrides are useful when restoring to clusters with different storage infrastructure - A single RWX and RWO storage class is applied across all Db2 persistent volumes (meta, data, backup, logs, temp) diff --git a/docs/guides/backup-restore.md b/docs/guides/backup-restore.md index 05f01b1b015..b8ed50fddca 100644 --- a/docs/guides/backup-restore.md +++ b/docs/guides/backup-restore.md @@ -18,8 +18,7 @@ This guide provides comprehensive information on backing up and restoring IBM Ma **Supported MAS versions** - MAS 9.1.x - -Note: MAS 9.0.x (Not supported yet, its in testing) +- MAS 9.2.x **User Permissions Required** diff --git a/docs/guides/backup.md b/docs/guides/backup.md index b98afb7fb6d..83dc6d101f3 100644 --- a/docs/guides/backup.md +++ b/docs/guides/backup.md @@ -202,27 +202,30 @@ The backup captures certificate configurations but not the actual certificates, The backup process supports backing up MAS application resources and persistent volume data. Currently supported: -- **Manage Application** - Backs up Manage namespace resources and persistent volume data +- **Manage Application** - Backs up Manage namespace resources and optionally persistent volume data +- **Facilities Application** - Backs up Facilities namespace resources and optionally persistent volume data -When backing up a Manage application, the following resources are included: +When backing up a Manage or Facilities application, the following resources are included: **Namespace Resources**: -- `ManageApp` custom resource -- `ManageWorkspace` custom resource -- Encryption secrets (dynamically determined from ManageWorkspace CR) +- Application custom resource (e.g., `ManageApp`, `FacilitiesApp`) +- Workspace custom resource (e.g., `ManageWorkspace`, `FacilitiesWorkspace`) +- Encryption secrets (dynamically determined from Workspace CR) - Certificates with `mas.ibm.com/instanceId` label - Subscription and OperatorGroup - IBM entitlement secret - All referenced secrets (auto-discovered) -**Persistent Volume Data** (if configured in ManageWorkspace CR): +**Persistent Volume Data** (optional, controlled by flags): +- Use `--backup-manage-include-pvc` to include Manage PVC data +- Use `--backup-facilities-include-pvc` to include Facilities PVC data - All persistent volumes defined in `spec.settings.deployment.persistentVolumes` - Data backed up as compressed tar.gz archives - Each PVC's mount path archived separately - Common PVCs include JMS server data, custom fonts, and attachments !!! note - Application backup is optional and configured during the interactive backup process or via command-line parameters (`--backup-manage-app`, `--manage-workspace-id`). + Application backup is optional and configured during the interactive backup process or via command-line parameters (`--backup-manage-app`, `--manage-workspace-id`, `--backup-manage-include-pvc` for Manage; `--backup-facilities-app`, `--facilities-workspace-id`, `--backup-facilities-include-pvc` for Facilities). ### Db2 Database Backup diff --git a/docs/guides/restore.md b/docs/guides/restore.md index 14323bb4e47..9bdefcbdd86 100644 --- a/docs/guides/restore.md +++ b/docs/guides/restore.md @@ -37,7 +37,9 @@ The restore process handles the following components: - **Suite-level SLSCfg** - Restores or provides custom Suite-level SLS configuration with optional URL override - **Suite-level BASCfg/DROCfg** - Restores or provides custom Suite-level DRO/BAS configuration with optional URL override - **Manage Database** - Optionally restores incluster Db2 database associated with Manage workspace -- **Manage Application** - Optionally restores Manage application namespace resources and persistent volume data +- **Manage Application** - Optionally restores Manage application namespace resources and optionally persistent volume data +- **Facilities Database** - Optionally restores incluster Db2 database associated with Facilities workspace +- **Facilities Application** - Optionally restores Facilities application namespace resources and optionally persistent volume data - **Grafana** - Optionally installs Grafana for monitoring (not part of backup) - **Data Reporter Operator (DRO)** - Optionally installs DRO (not part of backup), when DRO is installed, an auto-generated Suite-level BASCfg CR will be applied automatically. @@ -96,8 +98,10 @@ When downloading from S3 or Artifactory, the `download_backup_archive` role sele | `include_sls_archive` | `false` | Download the SLS backup archive | | `include_manage_db_archive` | `false` | Download the Manage Db2 database backup archive | | `include_manage_app_archive` | `false` | Download the Manage application backup archive | +| `include_facilities_db_archive` | `false` | Download the Facilities Db2 database backup archive | +| `include_facilities_app_archive` | `false` | Download the Facilities application backup archive | -These parameters are automatically set by the restore pipeline based on the restore configuration (e.g. `--restore-manage-app`, `--restore-manage-db`, `--include-sls`), so you do not need to set them manually when using the `mas restore` command. +These parameters are automatically set by the restore pipeline based on the restore configuration (e.g. `--restore-manage-app`, `--restore-manage-db`, `--restore-facilities-app`, `--restore-facilities-db`, `--include-sls`), so you do not need to set them manually when using the `mas restore` command. ### Ansible DevOps Integration