Restore a Configuration from Backup

LinuxBeginner
Practice Now

Introduction

An application configuration was accidentally removed, but a readable compressed backup is available. The archive also contains a runbook that is not part of this recovery.

The preceding guided lab practiced listing an archive and extracting one selected path. This final challenge focuses only on that recovery decision.

Restore the Missing Configuration

Current Situation

/home/labex/project/backup-automation/data/config/app.conf is missing. The archive backups/manual-backup.tar.gz contains the last known-good copy and one unrelated runbook.

Scope

  • Restore only the archived path config/app.conf.
  • Restore it below /home/labex/project/backup-automation/data.
  • Do not extract or change documents/runbook.txt.

Your Goal

Restore the missing data/config/app.conf from the prepared backup.

Acceptance Criteria

  • data/config/app.conf exists with:

    mode=production
    port=8080
    
  • data/documents/runbook.txt remains the original prepared file and is not replaced by extraction.

Hints

How can I extract one path instead of the whole archive?

The guided lab placed the selected archived path after the archive and destination options in the tar -xzf command.

Summary

You inspected a backup and selectively restored one missing configuration file without extracting unrelated content.

✨ Check Solution and Practice