Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions docs/commands/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ Usage
Usage information can be obtained using `mas backup --help`

```
usage: mas backup [-i MAS_INSTANCE_ID] [--backup-version BACKUP_VERSION] [--backup-storage-size BACKUP_STORAGE_SIZE]
usage: mas backup [-i MAS_INSTANCE_ID] [--backup-version BACKUP_VERSION]
[--backup-storage-size BACKUP_STORAGE_SIZE] [--backup-storage-class BACKUP_STORAGE_CLASS]
[--backup-storage-access-mode BACKUP_STORAGE_ACCESS_MODE]
[--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]
[--manage-db2-namespace MANAGE_DB2_NAMESPACE] [--manage-db2-instance-name MANAGE_DB2_INSTANCE_NAME]
[--manage-db2-backup-type {offline,online}] [--include-sls] [--exclude-sls]
[--manage-db2-backup-type {offline,online}] [--include-sls] [--exclude-sls] [--include-mongo] [--exclude-mongo]
[--mongodb-namespace MONGODB_NAMESPACE] [--mongodb-instance-name MONGODB_INSTANCE_NAME]
[--mongodb-provider {community}] [--sls-namespace SLS_NAMESPACE] [--cert-manager-provider {redhat,ibm}]
[--artifactory-username ARTIFACTORY_USERNAME] [--artifactory-token ARTIFACTORY_TOKEN] [--dev-mode] [--no-confirm]
Expand All @@ -31,8 +33,12 @@ MAS Instance:
Backup Configuration:
--backup-version BACKUP_VERSION
Version/timestamp for the backup (auto-generated if not provided)
--backup-storage-class BACKUP_STORAGE_CLASS
Storage class for backup-pvc PVC storage
--backup-storage-size BACKUP_STORAGE_SIZE
Size of the backup PVC storage (default: 20Gi)
--backup-storage-access-mode BACKUP_STORAGE_ACCESS_MODE
Access mode for backup PVC storage (ReadWriteOnce or ReadWriteMany)
--clean-backup Clean backup and config workspaces after completion (default: true)
--no-clean-backup Do not clean backup and config workspaces after completion

Expand Down Expand Up @@ -64,6 +70,8 @@ Manage Application Backup:
Manage Db2 backup type: offline (database unavailable) or online (database remains available)

Components:
--include-mongo Include Mongo in backup (default: true)
--exclude-mongo Exclude Mongo from backup (use if Mongo is external)
--include-sls Include SLS in backup (default: true)
--exclude-sls Exclude SLS from backup (use if SLS is external)

Expand Down Expand Up @@ -142,6 +150,16 @@ Create a backup without including Suite License Service (useful when SLS is exte
mas backup --instance-id inst1 --exclude-sls --no-confirm
```

### Backup Excluding MongoDB
Create a backup without including MongoDB (useful when MongoDB is externally hosted):

```bash
mas backup --instance-id inst1 --exclude-mongo --no-confirm
```

!!! note
Use `--exclude-mongo` when using external MongoDB providers such as IBM Cloud Databases for MongoDB, MongoDB Atlas, or other managed MongoDB services. You must back up your MongoDB database separately using your provider's native backup tools.

### Backup with Custom MongoDB Configuration
Specify custom MongoDB settings:

Expand Down Expand Up @@ -254,6 +272,7 @@ If not specified, the following defaults are used:
- **MongoDB Provider**: `community`
- **SLS Namespace**: `ibm-sls`
- **Certificate Manager Provider**: `redhat`
- **Include MongoDB**: `true`
- **Include SLS**: `true`

### Storage Requirements
Expand Down
29 changes: 27 additions & 2 deletions docs/commands/restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Usage
Usage information can be obtained using `mas restore --help`

```
usage: mas restore [-i MAS_INSTANCE_ID] [--restore-version RESTORE_VERSION] [--backup-storage-size BACKUP_STORAGE_SIZE]
usage: mas restore [-i MAS_INSTANCE_ID] [--restore-version RESTORE_VERSION]
[--backup-storage-size BACKUP_STORAGE_SIZE] [--backup-storage-class BACKUP_STORAGE_CLASS]
[--backup-storage-access-mode BACKUP_STORAGE_ACCESS_MODE]
[--mas-domain-restore MAS_DOMAIN_ON_RESTORE] [--sls-url-restore SLS_URL_ON_RESTORE]
[--dro-url-restore DRO_URL_ON_RESTORE] [--include-slscfg-from-backup] [--exclude-slscfg-from-backup]
[--sls-cfg-file SLS_CFG_FILE] [--dro-cfg-file DRO_CFG_FILE] [--include-drocfg-from-backup]
Expand All @@ -15,6 +17,7 @@ usage: mas restore [-i MAS_INSTANCE_ID] [--restore-version RESTORE_VERSION] [--b
[--s3-bucket-name S3_BUCKET_NAME] [--s3-region S3_REGION] [--artifactory-url ARTIFACTORY_URL]
[--artifactory-repository ARTIFACTORY_REPOSITORY] [--custom-backup-archive-name BACKUP_ARCHIVE_NAME]
[--include-grafana] [--exclude-grafana] [--include-dro] [--exclude-dro] [--include-sls] [--exclude-sls]
[--include-mongo] [--exclude-mongo]
[--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]
Expand Down Expand Up @@ -55,8 +58,12 @@ MAS Instance:
Restore Configuration:
--restore-version RESTORE_VERSION
Version/timestamp used in backup. Example: YYYYMMDD-HHMMSS
--backup-storage-class BACKUP_STORAGE_CLASS
Storage class for backup-pvc workspace.
--backup-storage-size BACKUP_STORAGE_SIZE
Size of the PVC storage, must be bigger than backup archive size. (default: 20Gi)
--backup-storage-access-mode BACKUP_STORAGE_ACCESS_MODE
Access mode for backup PVC storage (ReadWriteOnce or ReadWriteMany)
--clean-backup Clean backup and config workspaces after completion (default: true)
--no-clean-backup Do not clean backup and config workspaces after completion

Expand All @@ -78,6 +85,8 @@ Download Configuration:
Custom backup archive name to download from S3 or Artifactory

Components:
--include-mongo Include Mongo in restore (default: true)
--exclude-mongo Exclude Mongo from restore (use if Mongo is external)
--include-grafana Include Grafana in restore (default: true)
--exclude-grafana Skip installing Grafana.
--include-dro Include DRO in restore, this will install new DRO instance (default: true)
Expand Down Expand Up @@ -211,6 +220,20 @@ mas restore \
--no-confirm
```

### Restore Excluding MongoDB
Restore a backup without restoring MongoDB (useful when using external MongoDB):

```bash
mas restore \
--instance-id inst1 \
--restore-version 20260117-191701 \
--exclude-mongo \
--no-confirm
```

!!! note
Use `--exclude-mongo` when your MongoDB is externally hosted and was not included in the backup. Ensure your external MongoDB database is properly configured and accessible before restoring MAS.

### Restore with Custom SLS Configuration File
Restore using a custom SLS configuration file instead of the one from backup:

Expand Down Expand Up @@ -403,6 +426,7 @@ If not specified, the following defaults are used:

- **Backup Storage Size**: `20Gi`
- **Clean Workspaces**: `true` (workspaces are cleaned after completion)
- **Include MongoDB**: `true`
- **Include SLS**: `true`
- **Include Grafana**: `true`
- **Include DRO**: `true`
Expand Down Expand Up @@ -440,9 +464,10 @@ The restore command provides flexibility in how configurations are restored:
- By default, the MAS domain is restored from the backup
- Use `--mas-domain-restore` to change the domain during restore

### Component Installation
### Component Selection
The restore process can optionally install components that are not part of the backup:

- **Mongo**: MongoDb Community edition (when backed up, can be restored or skipped if using external Mongo). Use `--include-mongo` to restore Mongo from backup or `--exclude-mongo` to skip Mongo restoration.
- **Grafana**: Monitoring and visualization (not backed up, can be installed during restore). Use `--include-grafana` to install grafana during restore or `--exclude-grafana` to skip grafana installation.
- **DRO**: Data Reporting Operator (not backed up, can be installed during restore). Use `--include-dro` to install DRO during restore or `--exclude-dro` to skip DRO installation.
- **SLS**: Suite License Service (backed up, can be restored or skipped if using external SLS). Use `--include-sls` to restore SLS from backup or `--exclude-sls` to skip SLS installation.
Expand Down
58 changes: 50 additions & 8 deletions docs/guides/backup-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,28 @@ The Data Reporter Operator (DRO) is **not included in backup operations** as it

### MongoDB Configuration

The backup process supports **MongoDB Community Edition only**. Ensure you specify the correct MongoDB configuration:
The backup process supports **MongoDB Community Edition only**. By default, MongoDB is included in the backup. You can configure MongoDB settings or exclude it if using an external MongoDB provider.

**Including MongoDB in Backup (Default)**

When MongoDB is included, ensure you specify the correct MongoDB configuration:

- **Namespace** - Where MongoDB is deployed (default: `mongoce`)
- **Instance Name** - MongoDB instance identifier (default: `mas-mongo-ce`)
- **Provider** - Must be `community` (only supported provider for backup)

**Excluding MongoDB from Backup**

If you are using an external MongoDB provider (such as IBM Cloud Databases for MongoDB or other hosted MongoDB services), you should exclude MongoDB from the backup:

- Use `--exclude-mongo` flag in non-interactive mode
- In interactive mode, answer "No" when prompted to include MongoDB in backup

!!! warning
IBM Cloud Databases for MongoDB and other external MongoDB providers are not supported by the backup process. You must use their native backup mechanisms.
IBM Cloud Databases for MongoDB and other external MongoDB providers are not supported by the backup process. You must use their native backup mechanisms. When using external MongoDB, always use `--exclude-mongo` to skip MongoDB backup.

!!! tip
When excluding MongoDB from backup, you are responsible for backing up your MongoDB database using your provider's native backup tools. Ensure MongoDB backups are coordinated with MAS backups for consistency.

### Certificate Manager

Expand Down Expand Up @@ -338,7 +352,29 @@ mas backup \
--no-confirm
```

### Scenario 4: Backup with S3 Upload
### Scenario 4: External MongoDB Deployment

**Environment:**
- MAS in OpenShift cluster
- MongoDB hosted externally (e.g., IBM Cloud Databases for MongoDB, MongoDB Atlas, or other managed service)
- In-cluster SLS
- Red Hat Certificate Manager

**Backup Command:**
```bash
mas backup \
--instance-id inst1 \
--backup-storage-size 30Gi \
--exclude-mongo \
--no-confirm
```

Use `--exclude-mongo` to skip backing up MongoDB when it's managed externally. You must use your MongoDB provider's native backup mechanisms to back up the database separately.

!!! important
When using external MongoDB, coordinate your MongoDB backups with MAS backups to ensure data consistency. Back up MongoDB before or immediately after the MAS backup completes.

### Scenario 5: Backup with S3 Upload

**Environment:**
- Standard MAS deployment
Expand All @@ -362,7 +398,7 @@ mas backup \
!!! tip
Store AWS credentials securely using environment variables or secrets management systems rather than hardcoding them in scripts.

### Scenario 5: Backup with Manage Application and Db2 Database
### Scenario 6: Backup with Manage Application and Db2 Database

**Environment:**
- Standard MAS deployment with Manage application
Expand All @@ -387,7 +423,7 @@ mas backup \
!!! tip
When backing up Manage with Db2, ensure sufficient backup storage (100Gi+ recommended) to accommodate application PV data and database backups. Use offline backup type if your Db2 instance uses the default circular logging configuration.

### Scenario 6: Backup with Manage Application Only (External Db2)
### Scenario 7: Backup with Manage Application Only (External Db2)

**Environment:**
- MAS deployment with Manage application
Expand All @@ -407,7 +443,7 @@ mas backup \
!!! note
When using an external Db2 database, omit the `--backup-manage-db` flag. The database should be backed up separately using your organization's database backup procedures.

### Scenario 7: Backup for Troubleshooting (No Cleanup)
### Scenario 8: Backup for Troubleshooting (No Cleanup)

**Environment:**
- Backup for troubleshooting purposes
Expand All @@ -428,7 +464,7 @@ mas backup \
!!! note
Use `--no-clean-backup` when you need to inspect the backup workspace contents for troubleshooting. Remember to manually clean up the workspaces later to free up storage.

### Scenario 8: Minimal Backup (Skip Pre-Check)
### Scenario 9: Minimal Backup (Skip Pre-Check)

**Environment:**
- Emergency backup scenario
Expand Down Expand Up @@ -479,7 +515,12 @@ The backup process automatically selects appropriate storage:
- **Multi-node clusters**: Prefers ReadWriteMany (RWX) storage when available
- Falls back to RWO if RWX is not available

The storage class is determined from your cluster's default storage classes.
The storage class is determined from your cluster's storage classes.

You can override the default storage configuration using:

- `--backup-storage-class`: Specify a custom storage class for the backup PVC
- `--backup-storage-access-mode`: Specify the access mode (e.g., ReadWriteOnce, ReadWriteMany) for the backup PVC


Backup Process Details
Expand Down Expand Up @@ -792,6 +833,7 @@ When downloading from S3 or Artifactory, the `download_backup_archive` role sele

| Parameter | Default | Description |
|-----------|---------|-------------|
| `include_mongo_archive` | `false` | Download the Mongo backup archive |
| `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 |
Expand Down
Loading
Loading