Bird
0
0

You tried to restore a Docker volume backup with this command:

medium📝 Troubleshoot Q14 of 15
Docker - Production Patterns
You tried to restore a Docker volume backup with this command:
docker run --rm -v mydata:/data busybox tar cvf /backup/mydata.tar /data

But the backup file is empty. What is the likely mistake?
AUsing <code>tar cvf</code> instead of <code>tar xvf</code> to restore
BMounting the volume at the wrong path
CCreating a backup instead of restoring
DNot specifying the <code>-C</code> option to change directory
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command purpose

    tar cvf creates an archive (backup), not restore.
  2. Step 2: Understand the mistake

    The command tries to create a backup but is used when intending to restore, so the backup file is empty or incorrect.
  3. Final Answer:

    Creating a backup instead of restoring -> Option C
  4. Quick Check:

    tar cvf = backup, not restore [OK]
Quick Trick: tar cvf creates backup; use tar xvf to restore [OK]
Common Mistakes:
  • Confusing backup and restore tar options
  • Mounting volume incorrectly
  • Forgetting to use -C option

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes