Study Guide Chap12: Protecting Files Flashcards

(14 cards)

1
Q

1- 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
A

Full archive weekly; differential daily

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Incremental backup

A

is a backup method that only copies files that have been modified or created since the last backup (either full or incremental)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Differential backup

A

is a backup method that copies all files that have been modified or created since the last full backup (not since the last differential

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

2- 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
A

The gzip utility

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

3- 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
A

The cpio utility

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

4- 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
A

-cJvf

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cpio

A
  • a command-line archiving utility that creates and extracts archive files, commonly used for backing up files and creating initramfs/initrd images
  • Primary modes include copy-out mode (cpio -o) to create archives, copy-in mode (cpio -i) to extract archives, and copy-pass mode (cpio -p) to copy files directly
  • Common usage involves piping file lists from find command like find . | cpio -ov > archive.cpio to create archives, often used in system administration and kernel image creation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

5- 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

dd of=/dev/sde if=/dev/sdc

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

6- 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
A

The -a option

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

7- 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
A

zlib

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

8- 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
  • Well suited for quickly transferring files between two systems on a network
  • Is faster than the sftp utility
  • Uses OpenSSH for file transfers

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

9- 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
A

The reput command

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

scp

A
  • a command-line utility that securely transfers files and directories between local and remote systems over SSH
  • Basic syntax includes scp source destination where source/destination can be local paths or remote in format user@host:/path/to/file
  • Common options include -r for recursive directory copying, -P to specify SSH port, and -i to use specific SSH private key for authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

10- 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.
A

The archive was corrupted when it was transferred.

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly