nerdexam
CompTIA

XK0-005 · Question #249

A Linux administrator needs to back up files from a user's home directory to a remote server. The administrator copied the files last week but must ensure any files created or modified since then…

The correct answer is B. rsync -r /home/user99 [email protected]:/backups. To efficiently back up only new or modified files from a local directory to a remote server, rsync is the most suitable command due to its incremental transfer capabilities.

System Management

Question

A Linux administrator needs to back up files from a user's home directory to a remote server. The administrator copied the files last week but must ensure any files created or modified since then are added. Which of the following is the BEST command for the administrator to use?

Options

How the community answered

(30 responses)
  • A
    20% (6)
  • B
    70% (21)
  • C
    7% (2)
  • D
    3% (1)

Why each option

To efficiently back up only new or modified files from a local directory to a remote server, `rsync` is the most suitable command due to its incremental transfer capabilities.

Ascp -r /home/user99/* [email protected]:/backups/user99/

`scp -r` performs a full recursive copy of all files and directories every time, making it inefficient for incremental backups as it re-copies unchanged files.

Brsync -r /home/user99 [email protected]:/backupsCorrect

`rsync -r /home/user99 [email protected]:/backups` utilizes `rsync` with the recursive option (`-r`) to synchronize the local directory `/home/user99` to the remote destination. `rsync` intelligently compares files by modification time and size, transferring only those that are new or have changed, making it perfect for incremental backups.

Ccp -rf /home/user99/* /mnt/backups/user99/

`cp -rf` copies files locally and does not support remote transfers, nor does it inherently perform incremental synchronization.

Dsftp -b /home/user99/* [email protected]:/backups

`sftp` is an interactive file transfer program or can be scripted, but it lacks the built-in differential syncing algorithm that `rsync` uses for efficient incremental backups.

Concept tested: Incremental remote backups with rsync

Source: https://manpages.debian.org/stable/rsync/rsync.1.en.html

Topics

#rsync#Incremental Backup#Remote Copy#File Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice