# 1. System Backup — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: system_backup.md — every feature, sub-feature, and rule covered

---

## Test Execution Policy
- Zero tolerance: any deviation from documented behavior = FAILED = bug
- Every bug is immediately logged/reported (Bug ID, feature, sub-feature,
  expected vs actual, severity) and fixed 100% before the group passes
- Feature group passes only at 100% test pass rate

## Coverage Matrix
| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 1.1 Automated Scheduled Backups | Backup: the backup (the backup, the schedule, the scope, the date) | TC-SA-23-01-001 |
| 1.1 Automated Scheduled Backups | Schedule: the schedule (the schedule of the backup, the frequency, the time) | TC-SA-23-01-002 |
| 1.1 Automated Scheduled Backups | Scope: the scope (the scope of the backup, the data, the date) | TC-SA-23-01-003 |
| 1.1 Automated Scheduled Backups | Backup status: the status (the completed, the in-progress, the failed) | TC-SA-23-01-004 |
| 1.1 Automated Scheduled Backups | Backup count: the count (the count of the backups) | TC-SA-23-01-005 |
| 1.1 Automated Scheduled Backups | Backup size: the size (the size of the backup, the volume) | TC-SA-23-01-006 |
| 1.1 Automated Scheduled Backups | Backup view: the view (the backups, the schedules, the scopes, the dates) | TC-SA-23-01-007 |
| 1.1 Automated Scheduled Backups | Audit logging of the automated backup configuration | TC-SA-23-01-008 |
| 1.1 Automated Scheduled Backups | Rule: the backup is the safety (the backup, the schedule, the scope, the date); the backup is the copy | TC-SA-23-01-001 |
| 1.1 Automated Scheduled Backups | Rule: the schedule is the cadence (the schedule of the backup, the frequency, the time); the schedule is the rhythm | TC-SA-23-01-002 |
| 1.1 Automated Scheduled Backups | Rule: the scope is the boundary (the scope of the backup, the data, the date); the scope is the limit | TC-SA-23-01-003 |
| 1.1 Automated Scheduled Backups | Rule: the backup status is the state (the completed, the in-progress, the failed); the status is the control | TC-SA-23-01-004 |
| 1.1 Automated Scheduled Backups | Rule: the system is backed up (the backups, the schedules, the scopes, the dates); the safety is managed | TC-SA-23-01-007 |
| 1.1 Automated Scheduled Backups | Rule: automated backup configuration is audit-logged with the backup, schedule, and timestamp | TC-SA-23-01-008 |
| 1.2 Manual Backup on Demand | Backup: the backup (the backup, the scope, the date) | TC-SA-23-01-009 |
| 1.2 Manual Backup on Demand | Scope: the scope (the scope of the backup, the data, the date) | TC-SA-23-01-010 |
| 1.2 Manual Backup on Demand | Backup trigger: the trigger (the trigger of the backup, the request, the date) | TC-SA-23-01-011 |
| 1.2 Manual Backup on Demand | Backup status: the status (the completed, the in-progress, the failed) | TC-SA-23-01-012 |
| 1.2 Manual Backup on Demand | Backup count: the count (the count of the backups) | TC-SA-23-01-013 |
| 1.2 Manual Backup on Demand | Backup size: the size (the size of the backup, the volume) | TC-SA-23-01-014 |
| 1.2 Manual Backup on Demand | Backup view: the view (the backups, the scopes, the dates) | TC-SA-23-01-015 |
| 1.2 Manual Backup on Demand | Audit logging of the manual backup | TC-SA-23-01-016 |
| 1.2 Manual Backup on Demand | Rule: the backup is the safety (the backup, the scope, the date); the backup is the copy | TC-SA-23-01-009 |
| 1.2 Manual Backup on Demand | Rule: the scope is the boundary (the scope of the backup, the data, the date); the scope is the limit | TC-SA-23-01-010 |
| 1.2 Manual Backup on Demand | Rule: the backup trigger is the action (the trigger of the backup, the request, the date); the trigger is the request | TC-SA-23-01-011 |
| 1.2 Manual Backup on Demand | Rule: the backup status is the state (the completed, the in-progress, the failed); the status is the control | TC-SA-23-01-012 |
| 1.2 Manual Backup on Demand | Rule: the backup is available (the backups, the scopes, the dates); the safety is managed | TC-SA-23-01-015 |
| 1.2 Manual Backup on Demand | Rule: manual backup is audit-logged with the backup, scope, and timestamp | TC-SA-23-01-016 |
| 1.3 Backup Status Monitoring | Status: the status (the status, the backup, the state, the date) | TC-SA-23-01-017 |
| 1.3 Backup Status Monitoring | Backup: the backup (the backup, the scope, the date) | TC-SA-23-01-018 |
| 1.3 Backup Status Monitoring | State: the state (the state of the backup, e.g., the completed, the in-progress, the failed) | TC-SA-23-01-019 |
| 1.3 Backup Status Monitoring | Status count: the count (the count of the backups by state) | TC-SA-23-01-020 |
| 1.3 Backup Status Monitoring | Status period: the period (the period of the backups, e.g., the daily, the weekly, the monthly) | TC-SA-23-01-021 |
| 1.3 Backup Status Monitoring | Status view: the view (the statuses, the backups, the states, the dates) | TC-SA-23-01-022 |
| 1.3 Backup Status Monitoring | Status export: the export (the statuses, the format, the period) | TC-SA-23-01-023 |
| 1.3 Backup Status Monitoring | Audit logging of the backup status monitoring | TC-SA-23-01-024 |
| 1.3 Backup Status Monitoring | Rule: the status is the state (the status, the backup, the state, the date); the status is the condition | TC-SA-23-01-017 |
| 1.3 Backup Status Monitoring | Rule: the backup is the copy (the backup, the scope, the date); the backup is the safety | TC-SA-23-01-018 |
| 1.3 Backup Status Monitoring | Rule: the state is the condition (the state of the backup, e.g., the completed, the in-progress, the failed); the state is the phase | TC-SA-23-01-019 |
| 1.3 Backup Status Monitoring | Rule: the status count is the measure (the count of the backups by state); the count is the volume | TC-SA-23-01-020 |
| 1.3 Backup Status Monitoring | Rule: the backups are visible (the statuses, the backups, the states, the dates); the watch is managed | TC-SA-23-01-022 |
| 1.3 Backup Status Monitoring | Rule: backup status monitoring is audit-logged with the status, state, and timestamp | TC-SA-23-01-024 |
| 1.4 Backup Retention Management | Retention: the retention (the retention, the backup, the period, the date) | TC-SA-23-01-025 |
| 1.4 Backup Retention Management | Backup: the backup (the backup, the scope, the date) | TC-SA-23-01-026 |
| 1.4 Backup Retention Management | Retention period: the period (the period of the retention, e.g., the 30 days, the 90 days) | TC-SA-23-01-027 |
| 1.4 Backup Retention Management | Retention status: the status (the retained, the expired, the deleted) | TC-SA-23-01-028 |
| 1.4 Backup Retention Management | Retention count: the count (the count of the backups by status) | TC-SA-23-01-029 |
| 1.4 Backup Retention Management | Retention view: the view (the retentions, the backups, the periods, the dates) | TC-SA-23-01-030 |
| 1.4 Backup Retention Management | Retention export: the export (the retentions, the format, the period) | TC-SA-23-01-031 |
| 1.4 Backup Retention Management | Audit logging of the backup retention management | TC-SA-23-01-032 |
| 1.4 Backup Retention Management | Rule: the retention is the storage (the retention, the backup, the period, the date); the retention is the keeping | TC-SA-23-01-025 |
| 1.4 Backup Retention Management | Rule: the backup is the copy (the backup, the scope, the date); the backup is the safety | TC-SA-23-01-026 |
| 1.4 Backup Retention Management | Rule: the retention period is the duration (the period of the retention, e.g., the 30 days, the 90 days); the period is the time | TC-SA-23-01-027 |
| 1.4 Backup Retention Management | Rule: the retention status is the state (the retained, the expired, the deleted); the status is the control | TC-SA-23-01-028 |
| 1.4 Backup Retention Management | Rule: the backups are retained (the retentions, the backups, the periods, the dates); the storage is managed | TC-SA-23-01-030 |
| 1.4 Backup Retention Management | Rule: backup retention management is audit-logged with the retention, period, and timestamp | TC-SA-23-01-032 |

## 1.1 Automated Scheduled Backups

### TC-SA-23-01-001 — Backup: the backup (the backup, the schedule, the scope, the date); the backup is the copy
**Type:** Positive
**Covers:** 1.1 → Backup: the backup (the backup, the schedule, the scope, the date); Rule: the backup is the safety (the backup, the schedule, the scope, the date); the backup is the copy
**Preconditions:** Super Admin is logged in; an automated backup schedule is configured.
**Steps:**
1. Open Backup & Data Export → System Backup → Automated Scheduled Backups.
2. Wait for the scheduled run — verify the backup: the backup (the backup, the schedule, the scope, the date) is created automatically.
3. Verify the backup shows the schedule, the scope, and the date.
4. Verify the backup is a complete, restorable copy of the scoped data (the backup is the safety).
**Expected Result:** The backup runs automatically — the backup, the schedule, the scope, and the date are the copy; the system is backed up.
**Priority:** Critical

### TC-SA-23-01-002 — Schedule: the schedule (the schedule of the backup, the frequency, the time); the schedule is the rhythm
**Type:** Positive
**Covers:** 1.1 → Schedule: the schedule (the schedule of the backup, the frequency, the time); Rule: the schedule is the cadence (the schedule of the backup, the frequency, the time); the schedule is the rhythm
**Preconditions:** Super Admin is logged in; backup schedules exist.
**Steps:**
1. Set the schedule: the schedule (the schedule of the backup, the frequency, the time) — verify the schedule is the cadence.
2. Verify the schedule shows the frequency and the time.
3. Verify backups fire at exactly the scheduled time with the set frequency (no drift, no double-runs).
**Expected Result:** The schedule is set — the schedule of the backup, the frequency, and the time are the rhythm; runs fire on cadence.
**Priority:** High

### TC-SA-23-01-003 — Scope: the scope (the scope of the backup, the data, the date); the scope is the limit
**Type:** Positive
**Covers:** 1.1 → Scope: the scope (the scope of the backup, the data, the date); Rule: the scope is the boundary (the scope of the backup, the data, the date); the scope is the limit
**Preconditions:** Super Admin is logged in; multiple data areas exist.
**Steps:**
1. Set the scope: the scope (the scope of the backup, the data, the date) — verify the scope is the boundary.
2. Verify the scope shows the data and the date.
3. Run a backup — verify only the scoped data is included (out-of-scope data is never silently captured).
**Expected Result:** The scope is set — the scope of the backup, the data, and the date are the limit; only scoped data is backed up.
**Priority:** High

### TC-SA-23-01-004 — Backup status: the status (the completed, the in-progress, the failed); the status is the control
**Type:** Edge
**Covers:** 1.1 → Backup status: the status (the completed, the in-progress, the failed); Rule: the backup status is the state (the completed, the in-progress, the failed); the status is the control
**Preconditions:** Completed, in-progress, and failed backups exist; a scenario where the backup storage target is unavailable at run time (failed-backup edge) is also prepared.
**Steps:**
1. View the backup status: the status (the completed, the in-progress, the failed) — verify the backup status is the state.
2. Verify a running backup shows in-progress and a finished one shows completed.
3. Trigger the unavailable-storage run — verify the status becomes failed (never silently "completed"), the failure is visible in monitoring, and the documented alert fires; a failed backup is never reported as completed.
**Expected Result:** The backup status is shown — the completed, the in-progress, and the failed are the control; failures are always surfaced, never masked.
**Priority:** High

### TC-SA-23-01-005 — Backup count: the count (the count of the backups); the count is the measure
**Type:** Positive
**Covers:** 1.1 → Backup count: the count (the count of the backups)
**Preconditions:** Multiple automated backups exist.
**Steps:**
1. View the backup count: the count (the count of the backups) — verify the count is the measure.
2. Verify the count matches the actual number of backups.
3. Let a scheduled backup complete — verify the count increments.
**Expected Result:** The backup count is shown — the count of the backups is the measure.
**Priority:** High

### TC-SA-23-01-006 — Backup size: the size (the size of the backup, the volume); the size is the volume
**Type:** Positive
**Covers:** 1.1 → Backup size: the size (the size of the backup, the volume)
**Preconditions:** Multiple backups of varying sizes exist.
**Steps:**
1. View the backup size: the size (the size of the backup, the volume) — verify the size is the volume.
2. Verify the size shows the volume of each backup.
3. Verify the reported size matches the actual stored backup size (no under/over-reporting).
**Expected Result:** The backup size is shown — the size of the backup, the volume, is the volume; reported sizes are accurate.
**Priority:** High

### TC-SA-23-01-007 — Backup view: the view (the backups, the schedules, the scopes, the dates); the safety is managed
**Type:** Positive
**Covers:** 1.1 → Backup view: the view (the backups, the schedules, the scopes, the dates); Rule: the system is backed up (the backups, the schedules, the scopes, the dates); the safety is managed
**Preconditions:** Multiple automated backups exist.
**Steps:**
1. View the backups: the view (the backups, the schedules, the scopes, the dates) — verify the system is backed up.
2. Verify each backup shows the schedule, the scope, and the date.
3. Verify the safety is managed (view, schedule, monitor, verify).
**Expected Result:** The backups are viewed — the backups, the schedules, the scopes, and the dates are visible; the safety is managed.
**Priority:** High

### TC-SA-23-01-008 — Automated backup configuration is audit-logged with the backup, schedule, and timestamp
**Type:** Positive
**Covers:** 1.1 → Audit logging of the automated backup configuration; Rule: automated backup configuration is audit-logged with the backup, schedule, and timestamp
**Preconditions:** Super Admin has configured an automated backup.
**Steps:**
1. Open the audit trail and filter by "automated backup".
2. Verify entries show the backup, the schedule, and the timestamp.
**Expected Result:** The automated backup configuration is audit-logged with the backup, schedule, and timestamp.
**Priority:** Critical

## 1.2 Manual Backup on Demand

### TC-SA-23-01-009 — Backup: the backup (the backup, the scope, the date); the backup is the copy
**Type:** Positive
**Covers:** 1.2 → Backup: the backup (the backup, the scope, the date); Rule: the backup is the safety (the backup, the scope, the date); the backup is the copy
**Preconditions:** Super Admin is logged in.
**Steps:**
1. Open Backup & Data Export → System Backup → Manual Backup on Demand.
2. Run the manual backup: the backup (the backup, the scope, the date) — verify the backup is the safety.
3. Verify the backup shows the scope and the date.
4. Verify the backup is a complete, restorable copy of the scoped data.
**Expected Result:** The backup is run on demand — the backup, the scope, and the date are the copy.
**Priority:** Critical

### TC-SA-23-01-010 — Scope: the scope (the scope of the backup, the data, the date); the scope is the limit
**Type:** Positive
**Covers:** 1.2 → Scope: the scope (the scope of the backup, the data, the date); Rule: the scope is the boundary (the scope of the backup, the data, the date); the scope is the limit
**Preconditions:** Multiple data areas exist.
**Steps:**
1. Set the scope: the scope (the scope of the backup, the data, the date) — verify the scope is the boundary.
2. Verify the scope shows the data and the date.
3. Run the backup — verify only the scoped data is included.
**Expected Result:** The scope is set — the scope of the backup, the data, and the date are the limit.
**Priority:** High

### TC-SA-23-01-011 — Backup trigger: the trigger (the trigger of the backup, the request, the date); the trigger is the request
**Type:** Edge
**Covers:** 1.2 → Backup trigger: the trigger (the trigger of the backup, the request, the date); Rule: the backup trigger is the action (the trigger of the backup, the request, the date); the trigger is the request
**Preconditions:** A manual backup is already in progress (concurrent-trigger edge) and a second trigger request is prepared.
**Steps:**
1. Trigger the backup: the trigger (the trigger of the backup, the request, the date) — verify the trigger is the action.
2. Verify the trigger shows the request and the date.
3. Send the second trigger while the first is in progress — verify the system handles it per the documented rule (queues it or rejects with a clear message); two manual backups never corrupt each other or the storage.
**Expected Result:** The backup is triggered — the trigger of the backup, the request, and the date are the request; concurrent triggers never corrupt backups.
**Priority:** High

### TC-SA-23-01-012 — Backup status: the status (the completed, the in-progress, the failed); the status is the control
**Type:** Positive
**Covers:** 1.2 → Backup status: the status (the completed, the in-progress, the failed); Rule: the backup status is the state (the completed, the in-progress, the failed); the status is the control
**Preconditions:** Manual backups with various statuses exist.
**Steps:**
1. View the backup status: the status (the completed, the in-progress, the failed) — verify the backup status is the state.
2. Verify a running manual backup shows in-progress and a finished one shows completed.
3. Verify a failed manual backup shows failed with the reason.
**Expected Result:** The backup status is shown — the completed, the in-progress, and the failed are the control.
**Priority:** High

### TC-SA-23-01-013 — Backup count: the count (the count of the backups); the count is the measure
**Type:** Positive
**Covers:** 1.2 → Backup count: the count (the count of the backups)
**Preconditions:** Multiple manual backups exist.
**Steps:**
1. View the backup count: the count (the count of the backups) — verify the count is the measure.
2. Verify the count matches the actual number of backups.
3. Run a new manual backup — verify the count increments.
**Expected Result:** The backup count is shown — the count of the backups is the measure.
**Priority:** High

### TC-SA-23-01-014 — Backup size: the size (the size of the backup, the volume); the size is the volume
**Type:** Positive
**Covers:** 1.2 → Backup size: the size (the size of the backup, the volume)
**Preconditions:** Multiple manual backups exist.
**Steps:**
1. View the backup size: the size (the size of the backup, the volume) — verify the size is the volume.
2. Verify the size shows the volume of each backup.
3. Verify the reported size matches the actual stored backup size.
**Expected Result:** The backup size is shown — the size of the backup, the volume, is the volume.
**Priority:** High

### TC-SA-23-01-015 — Backup view: the view (the backups, the scopes, the dates); the safety is managed
**Type:** Positive
**Covers:** 1.2 → Backup view: the view (the backups, the scopes, the dates); Rule: the backup is available (the backups, the scopes, the dates); the safety is managed
**Preconditions:** Multiple manual backups exist.
**Steps:**
1. View the backups: the view (the backups, the scopes, the dates) — verify the backup is available.
2. Verify each backup shows the scope and the date.
3. Verify the safety is managed (view, trigger, monitor, verify).
**Expected Result:** The backups are viewed — the backups, the scopes, and the dates are visible; the safety is managed.
**Priority:** High

### TC-SA-23-01-016 — Manual backup is audit-logged with the backup, scope, and timestamp
**Type:** Positive
**Covers:** 1.2 → Audit logging of the manual backup; Rule: manual backup is audit-logged with the backup, scope, and timestamp
**Preconditions:** Super Admin has run a manual backup.
**Steps:**
1. Open the audit trail and filter by "manual backup".
2. Verify entries show the backup, the scope, and the timestamp.
**Expected Result:** The manual backup is audit-logged with the backup, scope, and timestamp.
**Priority:** Critical

## 1.3 Backup Status Monitoring

### TC-SA-23-01-017 — Status: the status (the status, the backup, the state, the date); the status is the condition
**Type:** Positive
**Covers:** 1.3 → Status: the status (the status, the backup, the state, the date); Rule: the status is the state (the status, the backup, the state, the date); the status is the condition
**Preconditions:** Super Admin is logged in; backups with statuses exist.
**Steps:**
1. Open Backup & Data Export → System Backup → Backup Status Monitoring.
2. Monitor the status: the status (the status, the backup, the state, the date) — verify the status is the state.
3. Verify the status shows the backup, the state, and the date.
4. Verify the monitoring reflects live backup states (no stale data).
**Expected Result:** The status is monitored — the status, the backup, the state, and the date are the condition.
**Priority:** Critical

### TC-SA-23-01-018 — Backup: the backup (the backup, the scope, the date); the backup is the safety
**Type:** Positive
**Covers:** 1.3 → Backup: the backup (the backup, the scope, the date); Rule: the backup is the copy (the backup, the scope, the date); the backup is the safety
**Preconditions:** Multiple backups exist.
**Steps:**
1. Select the backup: the backup (the backup, the scope, the date) — verify the backup is the copy.
2. Verify the backup shows the scope and the date.
3. Verify each monitored status is tied to exactly one backup.
**Expected Result:** The backup is selected — the backup, the scope, and the date are the safety.
**Priority:** High

### TC-SA-23-01-019 — State: the state (the state of the backup, e.g., the completed, the in-progress, the failed); the state is the phase
**Type:** Edge
**Covers:** 1.3 → State: the state (the state of the backup, e.g., the completed, the in-progress, the failed); Rule: the state is the condition (the state of the backup, e.g., the completed, the in-progress, the failed); the state is the phase
**Preconditions:** Backups in completed, in-progress, and failed states exist; a backup that has been in-progress far beyond its normal duration (stuck-backup edge) is also prepared.
**Steps:**
1. View the state: the state (the state of the backup, e.g., the completed, the in-progress, the failed) — verify the state is the condition.
2. Verify each backup shows its current state.
3. Check the stuck backup — verify the monitoring flags it (timeout alert / failed state per the documented rule); a stuck backup is never left silently in-progress.
**Expected Result:** The state is shown — the state of the backup (the completed, the in-progress, the failed) is the phase; stuck backups are always flagged.
**Priority:** High

### TC-SA-23-01-020 — Status count: the count (the count of the backups by state); the count is the volume
**Type:** Positive
**Covers:** 1.3 → Status count: the count (the count of the backups by state); Rule: the status count is the measure (the count of the backups by state); the count is the volume
**Preconditions:** Backups in multiple states exist.
**Steps:**
1. View the status count: the count (the count of the backups by state) — verify the status count is the measure.
2. Verify the count matches the actual number of backups per state.
3. Complete a backup — verify the per-state counts update.
**Expected Result:** The status count is shown — the count of the backups by state is the volume.
**Priority:** High

### TC-SA-23-01-021 — Status period: the period (the period of the backups, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 1.3 → Status period: the period (the period of the backups, e.g., the daily, the weekly, the monthly)
**Preconditions:** Backups exist across multiple periods.
**Steps:**
1. Set the status period: the period (the period of the backups, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Verify the monitoring filters to the selected period.
3. Verify period boundaries are applied correctly (no off-by-one day inclusion).
**Expected Result:** The status period is set — the period of the backups (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-23-01-022 — Status view: the view (the statuses, the backups, the states, the dates); the watch is managed
**Type:** Positive
**Covers:** 1.3 → Status view: the view (the statuses, the backups, the states, the dates); Rule: the backups are visible (the statuses, the backups, the states, the dates); the watch is managed
**Preconditions:** Multiple backup statuses exist.
**Steps:**
1. View the statuses: the view (the statuses, the backups, the states, the dates) — verify the backups are visible.
2. Verify each status shows the backup, the state, and the date.
3. Verify the watch is managed (view, filter, monitor, alert).
**Expected Result:** The statuses are viewed — the statuses, the backups, the states, and the dates are visible; the watch is managed.
**Priority:** High

### TC-SA-23-01-023 — Status export: the export (the statuses, the format, the period); the export is the record
**Type:** Edge
**Covers:** 1.3 → Status export: the export (the statuses, the format, the period)
**Preconditions:** Backup statuses exist for multiple periods; a period with no backups (zero-row export edge) is also prepared.
**Steps:**
1. Export the statuses: the export (the statuses, the format, the period) — verify the export is the record.
2. Verify the export contains all statuses for the selected period in the selected format.
3. Export the empty period — verify the export completes (empty file or clear "no data" message, no error/corrupt file).
**Expected Result:** The statuses are exported — the statuses, the format, and the period are the record; empty-period exports never produce corrupt files or errors.
**Priority:** High

### TC-SA-23-01-024 — Backup status monitoring is audit-logged with the status, state, and timestamp
**Type:** Positive
**Covers:** 1.3 → Audit logging of the backup status monitoring; Rule: backup status monitoring is audit-logged with the status, state, and timestamp
**Preconditions:** Super Admin has monitored backup statuses.
**Steps:**
1. Open the audit trail and filter by "backup status monitoring".
2. Verify entries show the status, the state, and the timestamp.
**Expected Result:** The backup status monitoring is audit-logged with the status, state, and timestamp.
**Priority:** Critical

## 1.4 Backup Retention Management

### TC-SA-23-01-025 — Retention: the retention (the retention, the backup, the period, the date); the retention is the keeping
**Type:** Positive
**Covers:** 1.4 → Retention: the retention (the retention, the backup, the period, the date); Rule: the retention is the storage (the retention, the backup, the period, the date); the retention is the keeping
**Preconditions:** Super Admin is logged in; backups exist.
**Steps:**
1. Open Backup & Data Export → System Backup → Backup Retention Management.
2. Manage the retention: the retention (the retention, the backup, the period, the date) — verify the retention is the storage.
3. Verify the retention shows the backup, the period, and the date.
4. Verify backups are kept for exactly the retention period (no early deletion, no indefinite keeping).
**Expected Result:** The retention is managed — the retention, the backup, the period, and the date are the keeping.
**Priority:** Critical

### TC-SA-23-01-026 — Backup: the backup (the backup, the scope, the date); the backup is the safety
**Type:** Positive
**Covers:** 1.4 → Backup: the backup (the backup, the scope, the date); Rule: the backup is the copy (the backup, the scope, the date); the backup is the safety
**Preconditions:** Multiple backups are under retention.
**Steps:**
1. Select the backup: the backup (the backup, the scope, the date) — verify the backup is the copy.
2. Verify the backup shows the scope and the date.
3. Verify each retention rule is tied to the correct backup.
**Expected Result:** The backup is selected — the backup, the scope, and the date are the safety.
**Priority:** High

### TC-SA-23-01-027 — Retention period: the period (the period of the retention, e.g., the 30 days, the 90 days); the period is the time
**Type:** Positive
**Covers:** 1.4 → Retention period: the period (the period of the retention, e.g., the 30 days, the 90 days); Rule: the retention period is the duration (the period of the retention, e.g., the 30 days, the 90 days); the period is the time
**Preconditions:** Retention periods are configured.
**Steps:**
1. Set the retention period: the period (the period of the retention, e.g., the 30 days, the 90 days) — verify the retention period is the duration.
2. Verify the period shows the duration.
3. Verify the period is applied consistently to all backups in scope.
**Expected Result:** The retention period is set — the period of the retention (the 30 days, the 90 days) is the time.
**Priority:** High

### TC-SA-23-01-028 — Retention status: the status (the retained, the expired, the deleted); the status is the control
**Type:** Edge
**Covers:** 1.4 → Retention status: the status (the retained, the expired, the deleted); Rule: the retention status is the state (the retained, the expired, the deleted); the status is the control
**Preconditions:** Retained, expired, and deleted backups exist; a backup that has just crossed its retention expiry boundary (expiry-boundary edge) is also prepared.
**Steps:**
1. View the retention status: the status (the retained, the expired, the deleted) — verify the retention status is the state.
2. Verify in-period backups show retained.
3. Check the boundary backup — verify it transitions to expired exactly at the documented boundary (not a day early, not a day late) and is deleted only per the documented deletion rule; a retained backup is never deleted early.
**Expected Result:** The retention status is shown — the retained, the expired, and the deleted are the control; expiry transitions happen exactly at the boundary.
**Priority:** High

### TC-SA-23-01-029 — Retention count: the count (the count of the backups by status); the count is the measure
**Type:** Positive
**Covers:** 1.4 → Retention count: the count (the count of the backups by status)
**Preconditions:** Backups in multiple retention statuses exist.
**Steps:**
1. View the retention count: the count (the count of the backups by status) — verify the retention count is the measure.
2. Verify the count matches the actual number of backups per status.
3. Expire a backup — verify the per-status counts update.
**Expected Result:** The retention count is shown — the count of the backups by status is the measure.
**Priority:** High

### TC-SA-23-01-030 — Retention view: the view (the retentions, the backups, the periods, the dates); the storage is managed
**Type:** Positive
**Covers:** 1.4 → Retention view: the view (the retentions, the backups, the periods, the dates); Rule: the backups are retained (the retentions, the backups, the periods, the dates); the storage is managed
**Preconditions:** Multiple retentions exist.
**Steps:**
1. View the retentions: the view (the retentions, the backups, the periods, the dates) — verify the backups are retained.
2. Verify each retention shows the backup, the period, and the date.
3. Verify the storage is managed (view, set period, track, delete).
**Expected Result:** The retentions are viewed — the retentions, the backups, the periods, and the dates are visible; the storage is managed.
**Priority:** High

### TC-SA-23-01-031 — Retention export: the export (the retentions, the format, the period); the export is the record
**Type:** Edge
**Covers:** 1.4 → Retention export: the export (the retentions, the format, the period)
**Preconditions:** Retentions exist for multiple periods; a period with no retentions (zero-row export edge) is also prepared.
**Steps:**
1. Export the retentions: the export (the retentions, the format, the period) — verify the export is the record.
2. Verify the export contains all retentions for the selected period in the selected format.
3. Export the empty period — verify the export completes (empty file or clear "no data" message, no error/corrupt file).
**Expected Result:** The retentions are exported — the retentions, the format, and the period are the record; empty-period exports never produce corrupt files or errors.
**Priority:** High

### TC-SA-23-01-032 — Backup retention management is audit-logged with the retention, period, and timestamp
**Type:** Positive
**Covers:** 1.4 → Audit logging of the backup retention management; Rule: backup retention management is audit-logged with the retention, period, and timestamp
**Preconditions:** Super Admin has managed backup retention.
**Steps:**
1. Open the audit trail and filter by "backup retention".
2. Verify entries show the retention, the period, and the timestamp.
**Expected Result:** The backup retention management is audit-logged with the retention, period, and timestamp.
**Priority:** Critical
