Test: restore engine — full restore, partial restore, config preservation #4

Open
opened 2026-06-02 20:29:21 +00:00 by jmiller · 1 comment
Owner

Verify RestoreEngine correctly restores from backup archives.

Scope

  • Full restore (files + database)
  • Files-only restore
  • Database-only restore
  • configuration.php preservation
  • Staging directory cleanup

Acceptance Criteria

  • Full restore overwrites files and reimports database
  • configuration.php is preserved with current DB credentials
  • Partial restores (files-only, db-only) work correctly
  • Staging directory is cleaned up after restore
  • Failed restore preserves configuration.php
Verify RestoreEngine correctly restores from backup archives. ## Scope - Full restore (files + database) - Files-only restore - Database-only restore - configuration.php preservation - Staging directory cleanup ## Acceptance Criteria - [ ] Full restore overwrites files and reimports database - [ ] configuration.php is preserved with current DB credentials - [ ] Partial restores (files-only, db-only) work correctly - [ ] Staging directory is cleaned up after restore - [ ] Failed restore preserves configuration.php
jmiller added the type: testingpriority: criticalcomponent: enginestatus: ready labels 2026-06-02 20:29:21 +00:00
Author
Owner

Testing Plan

Pre-requisites

  • Working backup archive from a known-good state
  • Test database that can be safely overwritten

TC-4.1: Full restore

  1. Make a backup of a site with known content
  2. Modify some articles and delete a file
  3. Run restore from the backup
  4. Verify articles are back to original state
  5. Verify deleted file is restored
  6. Verify configuration.php has CURRENT db credentials (not backup's)

TC-4.2: Files-only restore

  1. Run restore with restore_db=false
  2. Verify files are restored
  3. Verify database is unchanged

TC-4.3: Database-only restore

  1. Run restore with restore_files=false
  2. Verify database is restored
  3. Verify files are unchanged

TC-4.4: Config preservation

  1. Backup site A with db credentials for server A
  2. Restore to site B with different db credentials
  3. Verify configuration.php keeps site B's credentials

TC-4.5: Failed restore cleanup

  1. Corrupt a backup ZIP file
  2. Attempt restore
  3. Verify error message, staging dir cleaned up
  4. Verify configuration.php unchanged

TC-4.6: Protected files

  1. Verify .htaccess at root is NOT overwritten during restore
  2. Verify database.sql is NOT extracted to site root
## Testing Plan ### Pre-requisites - Working backup archive from a known-good state - Test database that can be safely overwritten **TC-4.1: Full restore** 1. Make a backup of a site with known content 2. Modify some articles and delete a file 3. Run restore from the backup 4. Verify articles are back to original state 5. Verify deleted file is restored 6. Verify configuration.php has CURRENT db credentials (not backup's) **TC-4.2: Files-only restore** 1. Run restore with restore_db=false 2. Verify files are restored 3. Verify database is unchanged **TC-4.3: Database-only restore** 1. Run restore with restore_files=false 2. Verify database is restored 3. Verify files are unchanged **TC-4.4: Config preservation** 1. Backup site A with db credentials for server A 2. Restore to site B with different db credentials 3. Verify configuration.php keeps site B's credentials **TC-4.5: Failed restore cleanup** 1. Corrupt a backup ZIP file 2. Attempt restore 3. Verify error message, staging dir cleaned up 4. Verify configuration.php unchanged **TC-4.6: Protected files** 1. Verify .htaccess at root is NOT overwritten during restore 2. Verify database.sql is NOT extracted to site root
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomBackup#4