Lab Information
Within the Stratos DC, the Nautilus storage server hosts a directory named /data, serving as a repository for various developers non-confidential data. Developer mark has requested a copy of their data stored in /data/mark. The System Admin team has provided the following steps to fulfill this request:
a. Create a compressed archive named mark.tar.gz of the /data/mark directory.
b. Transfer the archive to the /home directory on the Storage Server.
Lab Solutions
π§ Part 1: Lab Step-by-Step Guidelines (Technical Execution)
πΉ Step 1: Log in to Jump Host
ssh thor@jump_host.stratos.xfusioncorp.com
Password:
mjolnir123
πΉ Step 2: SSH into Storage Server
ssh natasha@ststor01.stratos.xfusioncorp.com
Password:
Bl@kW
πΉ Step 3: Switch to root
sudo -i
πΉ Step 4: Create compressed archive
tar -czf mark.tar.gz -C /data mark
Why this format?
-c β create archive
-z β gzip compression
-f β filename
-C /data β change into /data first
mark β archive only the directory (avoids full absolute path)
It means Go inside /data, and archive the folder named mark
πΉ Step 5: Move archive to /home
mv mark.tar.gz /home/
πΉ Step 6: Verify archive exists
ls -lh /home/mark.tar.gz
β Final Checklist
β Archive name: mark.tar.gz
β Contains /data/mark directory
β Compressed using gzip
β File located in /home
β Verified successfully
π§ Part 2: Simple Step-by-Step Explanation (Beginner Friendly)
πΉ What is the goal?
Developer mark has data inside:
/data/mark
We must:
Compress it into a .tar.gz file
Place that archive inside /home
πΉ Why use tar -czf?
tar creates archives.
-c β create
-z β compress using gzip
-f β specify filename
So:
tar -czf mark.tar.gz
creates a compressed archive file.
πΉ Why use -C /data mark instead of /data/mark?
If we run:
tar -czf mark.tar.gz /data/mark
The archive will contain:
data/mark/...
But using:
-C /data mark
The archive cleanly contains:
mark/...
This avoids unnecessary parent directory levels.
Labs often check for correct structure.
πΉ Why move to /home?
The task explicitly requires:
Transfer the archive to the /home directory.
So after creation, we move it there.
Top comments (0)