Chapter 12 Flashcards
Protecting Files
Describe the different backup types.
A system image backup takes a complete copy of files the operating system needs to operate. This allows a restore to take place, which will get the system back up and running. The full, incremental, and differential backups are tied together in how data is backed up and restored. Snapshots and snapshot clones are also closely related and provide the opportunity to achieve rigorous backups in high I/O environments.
Summarize compression methods.
The different utilities, gzip, bzip2, xz, and zip, provide different levels of lossless data compression. Each one’s compression level is tied to how fast it operates. Reducing the size of archive data files is needed not only for backup storage but also for increasing transfer speeds across the network.
Compare the various archive/restore utilities.
The assorted command-line utilities each have their own strengths in creating data backups and restoring files. While cpio is one of the oldest, it allows for various files through the system to be gathered and put into an archive. The tar utility has long been used with tape media but provides rigorous and flexible archiving and restoring features, which make it still very useful in today’s environment. The dd utility shines when it comes to making system images of an entire disk. Finally, not only is rsync very fast, but it also allows encrypted transfers of data across a network for remote backup storage.
Explain the needs when storing backups on other systems.
To move an archive across the network to another system, it is important to provide data security. Thus, often OpenSSH is employed. In addition, once an archive file arrives at its final destination, it is critical to ensure that no data corruption has occurred during the transfer. Therefore, tools such as md5sum and sha512sum are used.
Time and space to generate archives are not an issue, and your system’s environment is not a high I/O one. You want to create full backups for your system only once per week and need to restore data as quickly as possible. Which backup type plan should you use?
Full archive daily Incremental archive daily Differential archive daily Full archive weekly; incremental daily Full archive weekly; differential daily
E. Scheduling a full archive weekly and implementing a differential backup daily (which backs up all the data that is new or modified since the last full archive) will meet the requirements. Therefore, option E is the correct answer. Since you only want to create a full backup one time per week, option A is a wrong answer. Doing an incremental every day without a periodic full archive would result in a long time period to restore data. So option B does not match the requirements and is an incorrect choice. Doing a differential archive daily also does not fully match the requirements, because you are not conducting a full archive weekly. Thus, option C is a wrong answer. Option D is not as time efficient for a data restore as option E, because you would have to apply each incremental to restore data instead of one differential archive. Therefore, option D is also an incorrect choice.
The system admin took an archive file and applied a compression utility to it. The resulting file extension is .gz. Which compression utility was used?
The xz utility The gzip utility The bzip2 utility The zip utility The dd utility
B. The gzip utility compresses data files and gives them the .gz file extension. Therefore, option B is the correct answer. The xz, bzip2, and zip compression utilities compress a data file and give it a different file extension, so options A, C, and D are wrong answers. The dd utility is not a compression program. Therefore, option E is also a wrong choice.
You need to quickly create a special archive. This archive will be a single compressed file, which contains any files with the extension .snar across the virtual directory structure. Which archive utility should you use?
The tar utility The dd utility The rsync utility The cpio utility The zip utility
D. To quickly create an archive of disparate files around the virtual directory structure, the best utility to use is the cpio program. This is because you can employ the find command to locate the files and then pipe the results into the cpio utility. Therefore, option D is the correct answer. While the tar utility uses SNAR files, it is not the most efficient program to use in this scenario, and thus, option A is a wrong answer. The dd utility is used for entire disks or partitions, and therefore, option B is an incorrect answer. The rsync and zip programs are not the most efficient utilities to use in this scenario, so options C and E are also incorrect choices.
An administrator needs to create a full backup using the tar utility, compress it as much as possible, and view the files as they are being copied into the archive. What tar options should the admin employ?
-xzvf -xJvf -czvf -cJf -cJvf
E. The tar options -cJvf will create a tarball using the highest compression utility, xz, and allow the administrator to view the files via the verbose option while they are being copied into the compressed archive. Thus, option E is the correct answer. The switches in options A and B perform extracts (-x) and do not create, so they are wrong answers. The only thing wrong with option C is that it employs gzip compression via the -z switch, so it is an incorrect choice. Option D leaves out the verbose switch, so it too is an incorrect choice.
You need to create a low-level backup of all the data on the /dev/sdc drive and want to use the /dev/sde drive to store it on. Which dd command should you use?
dd of=/dev/sde if=/dev/sdc dd of=/dev/sdc if=/dev/sde dd of=/dev/sde if=/dev/sdc count=5 dd if=/dev/sde of=/dev/sdc count=5 dd if=/dev/zero of=/dev/sdc
A. The dd command in option A will accomplish the job correctly and is the correct answer. The dd commands in options B through D have the input and output files flip-flopped, so they would destroy the data on the /dev/sdc drive. Therefore, options B, C, and D are wrong answers. The dd command in option E would wipe the /dev/sdc drive using zeros. Therefore, option E is also an incorrect choice.
You need to create a backup of a user directory tree. You want to ensure that all the file metadata is retained. Employing super user privileges, which of the following should you use with the rsync utility?
The -r option The -z option The -a option The -e option The --rsh option
C. The -a switch allows you to recursively back up a directory tree and preserves all the file metadata. It is equivalent to using the -rlptgoD switches. Therefore, option C is the correct answer. The -r switch only allows recursive operations but does not preserve metadata, such as file ownership. Therefore, option A is a wrong answer. The -z switch employs compression and nothing else, so option B is a wrong choice. The -e and –rsh switches are used to designate a remote program to use when sending files to a remote system. Thus, options D and E are also incorrect choices.
You decide to compress the archive you are creating with the rsync utility and employ the -z option. Which compression method are you using?
compress gzip bzip2 xz zlib
E. When you use the -z switch in conjunction with the rsync utility, you are employing compression from the zlib library. Therefore, option E is correct. And thus, options A, B, C, and D are incorrect choices.
Which of the following is true concerning the scp utility? (Choose all that apply.)
Well suited for quickly transferring files between two systems on a network Is faster than the sftp utility An interactive utility useful for quickly transferring large files Can be interrupted during file transfers with no ill effects Uses OpenSSH for file transfers
A, B, E. Options A, B, and E are all true statements regarding the scp utility and therefore are correct answers. The scp program is not an interactive utility, and so option C is a wrong answer. Also, the scp utility cannot be interrupted without ill effects (you have to start all over), so option D is also an incorrect choice.
You are transferring files for a local backup using the sftp utility to a remote system and the process gets interrupted. What sftp utility command should you use next?
The progress command The get command The reget command The put command The reput command
E. The reput command will resume your interrupted operation of uploading a local backup to a remote system. Therefore, option E is the correct answer. The progress command toggles on and off the progress display, so option A is a wrong answer. The get command and the reget command involve downloading a file from a remote system to a local system. Thus, options B and C are wrong choices. Though the put command was probably used prior to the operation’s start, it will not resume an upload, so option D is also an incorrect choice.
You have completed a full archive and sent it to a remote system using the sftp utility. You employ the md5sum program on both the local archive and its remote copy. The numbers don’t match. What most likely is the cause of this?
The local archive was corrupted when it was created. The archive was corrupted when it was transferred. You used incorrect commands within the sftp utility. The numbers only match if corruption occurred. You used incorrect utility switches on md5sum.
B. In this scenario, the most likely cause is that the archive got corrupted when it was transferred to the remote system. Therefore, option B is correct. If the local archive was corrupted when it was created, transferring would either corrupt it more or leave it the same. Therefore, option A is a wrong answer. Using incorrect commands within the sftp utility or wrong switches on the md5sum program will not typically cause corruption. Therefore, options C and E are wrong choices. The numbers only match if corruption has not occurred, and thus, option D is also an incorrect choice.