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?
To mirror the website files on the primary web server, www1, to the backup web server, www2, the administrator can use the command rsync -a -e ssh /var/www/html/ user1@www2:/var/www/html (A). This will synchronize all files and directories under /var/www/html/ on www1 to /var/www/html on www2 using ssh as the remote shell. The -a option will preserve all attributes and permissions of the files. The other commands will not mirror the website files, but either copy them once, download them from a web server, or archive them. References:
[CompTIA Linux+ Study Guide], Chapter 12: Troubleshooting Linux Systems, Section: Synchronizing Files with rsync
[How to Use rsync Command in Linux]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit