nerdexam
CompTIA

XK0-004 · 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. rsync is the correct tool because it performs incremental synchronization, transferring only files that are new or modified since the last run, which is exactly what the administrator needs.

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

(36 responses)
  • A
    6% (2)
  • B
    89% (32)
  • C
    3% (1)
  • D
    3% (1)

Why each option

rsync is the correct tool because it performs incremental synchronization, transferring only files that are new or modified since the last run, which is exactly what the administrator needs.

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

scp always transfers every specified file unconditionally with no ability to skip files that already exist unchanged on the destination, so it cannot perform incremental backups.

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

rsync compares source and destination files using checksums and timestamps, then transfers only the differences - making it ideal for incremental backups after an initial full copy. The -r flag enables recursive directory traversal, and rsync natively supports remote targets over SSH using the user@host:/path syntax.

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

cp operates only on locally mounted filesystems and cannot transfer files to a remote server over the network.

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

sftp -b executes a batch file of SFTP commands, not a file glob path, so this syntax is invalid and sftp has no built-in incremental or differential transfer capability.

Concept tested: Incremental remote file synchronization with rsync

Source: https://rsync.samba.org/documentation.html

Topics

#rsync#incremental backup#remote transfer#scp

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice