nerdexam
CompTIACompTIA

XK0-005 · Question #1640

XK0-005 Question #1640: Real Exam Question with Answer & Explanation

The correct answer is A: [www1] $ rsync -a -e ssh /var/www/html user1@www2:/var/www/html. {"question_number": 1, "correct_answer": "A", "explanation": "rsync is the most efficient tool for mirroring because it uses delta synchronization - it only transfers files that have changed, rather than copying everything every time. The -a flag enables archive mode (preserves p

System Management

Question

An administrator would like to mirror the website files on the primary web server www1, to the backup web server www2. Which of the following commands should the administrator use to most efficiently accomplish this task?

Options

  • A[www1] $ rsync -a -e ssh /var/www/html user1@www2:/var/www/html
  • B[www1] $ scp -r /var/www/html user1@www2:/var/www/html
  • D[www1] $ cd /var/www/html && tar cvf - . | ssh user1@www2 ' (cd/var/www/html; tar xvf -)'

Explanation

{"question_number": 1, "correct_answer": "A", "explanation": "rsync is the most efficient tool for mirroring because it uses delta synchronization - it only transfers files that have changed, rather than copying everything every time. The -a flag enables archive mode (preserves permissions, timestamps, symbolic links, ownership), and -e ssh specifies SSH as the transport for secure transfer. scp -r (option B) always copies all files regardless of changes, making it inefficient for ongoing mirroring. The tar-over-ssh method (option D) also transfers everything each time and is more complex to manage.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#rsync#file synchronization#remote file transfer#command line utilities

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions