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.
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
- Ascp -r /home/user99/* [email protected]:/backups/user99/
- Brsync -r /home/user99 [email protected]:/backups
- Ccp -rf /home/user99/* /mnt/backups/user99/
- Dsftp -b /home/user99/* [email protected]:/backups
How the community answered
(36 responses)- A6% (2)
- B89% (32)
- C3% (1)
- D3% (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.
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.
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.
cp operates only on locally mounted filesystems and cannot transfer files to a remote server over the network.
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
Community Discussion
No community discussion yet for this question.