Question : Within the Stratos DC, the Nautilus storage server hosts a directory named /data, serving as a repository for various developers non-confidential data. Developer jim has requested a copy of their data stored in /data/jim. The System Admin team has provided the following steps to fulfill this request:
a. Create a compressed archive named jim.tar.gz of the /data/jim directory.
b. Transfer the archive to the /home directory on the Storage Server.
Please Note :- Perform the below commands based on your question server, user name & other details might differ . So please read task carefully before executing. All the Best 👍
Solution:
1. At first login on storage server & Switch to root user
thor@jump_host ~$ ssh natasha@ststor01 The authenticity of host 'ststor01 (172.16.238.15)' can't be established. ECDSA key fingerprint is SHA256:OWmtNn2YObQR5vQ0uP6Jg+peCclJ+sB1VH/KuLeXJJc. ECDSA key fingerprint is MD5:46:9f:1e:ac:41:e3:23:68:45:18:71:37:8c:f8:df:17. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ststor01,172.16.238.15' (ECDSA) to the list of known hosts. natasha@ststor01's password: [natasha@ststor01 ~]$ sudo su - We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for natasha: [root@ststor01 ~]# |
2. Run Below command to archive the folder ( check folder name in your task)
[root@ststor01 ~]# ls -l /data total 4 drwxrwxrwx 2 root root 4096 Jul 23 11:25 jim [root@ststor01 ~]# [root@ststor01 ~]# tar -czvf jim.tar.gz /data/jim tar: Removing leading `/' from member names /data/jim/ /data/jim/nautilus3.txt /data/jim/nautilus2.txt /data/jim/nautilus1.txt [root@ststor01 ~]# |
3. Move the tar file to /home
[root@ststor01 ~]# ls -ltr total 24 -rw------- 1 root root 3850 May 27 2024 original-ks.cfg -rw------- 1 root root 435 May 27 2024 anaconda-post.log -rw------- 1 root root 95 May 27 2024 anaconda-post-nochroot.log -rw------- 1 root root 4115 May 27 2024 anaconda-ks.cfg -rw-r--r-- 1 root root 186 Jul 23 11:34 jim.tar.gz [root@ststor01 ~]# [root@ststor01 ~]# mv jim.tar.gz /home/ [root@ststor01 ~]# |
4. Validate the task by listing the file exist in Home directory
[root@ststor01 ~]# ls -ltr /home/ total 20 drwx------ 1 ansible ansible 4096 Jun 5 2024 ansible drwx------ 1 natasha natasha 4096 Jun 6 2024 natasha -rw-r--r-- 1 root root 186 Jul 23 11:34 jim.tar.gz [root@ststor01 ~]# |
5. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments