Build and verify a portable tar archive
8 steps · about 2 h 29 min · Intermediate
- Create an archive from explicit paths (guide, GNU tar manual, 20 min)
Control the working directory and member names so restoration does not depend on one machine's layout.
- Exclude generated and sensitive files (guide, GNU tar manual, 18 min)
Keep caches, secrets and irrelevant output out of the archive by an auditable rule.
- Choose a compression format (guide, GNU tar manual, 18 min)
Apply compression separately from the archive structure and retain a recognizable suffix.
- Inspect the archive manifest (guide, GNU tar manual, 18 min)
Review member names, sizes and metadata without extracting them.
- Check archive readability (guide, GNU tar manual, 18 min)
Test the compressed stream and archive before moving or deleting any source data.
- Record a SHA-256 checksum (reference, GNU Coreutils manual, 15 min)
Detect corruption or substitution when the archive moves between systems.
- Restore into a clean destination (guide, GNU tar manual, 22 min)
Prove that the archive is usable without overwriting the original tree.
- Audit restored permissions and ownership (guide, GNU tar manual, 20 min)
Verify which metadata was preserved and avoid restoring unsafe ownership or modes blindly.