Write the command that can be used to perform the following: a. Back up the cont
ID: 3860498 • Letter: W
Question
Write the command that can be used to perform the following: a. Back up the contents of the /var directory (which contains symbolically linked files) to the second nonrewinding SCSI tape device on the system using the tar utility. b. Append the file /etc/inittab to the archive created in Exercise 3a. c. Create a tarball called /stuff.tar.gz that contains all files in the /root/stuff directory. d. Use the cpio utility to back up all files in the /var directory (which contains symbolically linked files) to the first rewinding IDE tape device that has a block size of 5KB. e. Perform a full filesystem backup of the /var filesystem using the dump utility and record the event in the /etc/dumpdates file. f. View the contents of the archives created in Exercises 3a, c, d, and e. g. Extract the contents of the archives created in Exercises 3a and c to the /root directory. h. Extract the contents of the archives created in Exercises 3d and e to their original locations. I need the answer explained fully for all the letters. Thank you.
Explanation / Answer
a) Content backup of /var directory can be done with following given command.
tar -cvpzf /Backup/backupNew.tar.gz /var
Note: Here "/Backup/" is the path where, backup will be created. We can change it according, to get the backup in the desired location.
b) Appending the file /etc/inittab requried following given three steps:
i) gunzip backupNew.tar.gz
ii) tar -uf backupNew.tar /etc/inittab
iii) gzip backupNew.tar
c) The following command will create the stuff.tar.gz
# tar -zcvf /root/stuff/stuff.tar.gz /root/stuff
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.