Comparing rsync to scp
-
No need for a screenshot of this page!
-
Make sure that you have one account on your VM that you can ssh to without
a password. If you do not have any account, you must created one now. Make sure
that you can ssh without a password before trying this exercise.
-
You will need to have 2 terminals open for this exercise: one on sit, the other on
your vm as the user.
-
Make a folder on your VM (in the user's home folder) called a42rsync and a folder called
a42scp.
-
On sit, create a folder called a42rsyncscp and extract the contents of the file
https://sit.cna-qatar.edu.qa/cr2510/datafiles/rsyncdist.tgz
into this folder. Erase the rsyncdist.tgz file when you are finished.
-
From sit, write the appropriate scp command to copy the entire a42rscynscp folder
(and all files) to your virtual machine into the folder a42scp. Check on your VM to
see if the files and folders were actually copied. Erase the a42scp folder on your VM
and try a couple more times. No need for any screenshots at this point but do make note
of the command. Use the "-q" option to prevent messages from appearing on the screen,
this will affect the timings.
-
From sit, write the appropriate rscyn command to copy the entire a42srcynscp folder
to your virtual machine into the folder a42rsync. Check from your VM that the
files have been copied. No need for any screenshots yet but do make note of the
command.
-
Measure the time it takes to run scp from sit to your VM. Use the following
process:
- Erase the contents of the vm destination folder.
- Use the time command to perform an initial copy.
- Without erasing the vm folder, run the scp command again measuring time.
- Take a screenshot of the commands. You can skip this for the second
and third measurements.
- Complete row #1 of the following table. Put the "real time" value into the
table cell.
- Repeat these instructions 2 more times for a total of three runs.
- Calculate the average of each column.
Experiment # | First scp | Second scp |
1 | | |
2 | | |
3 | | |
Average | | |
-
Measure the time it takes to run rsync from sit to your VM. Use the following
process:
- Erase the contents of the vm destination folder.
- Use the time command to perform an initial copy.
- Without erasing the vm folder, run the scp command again measuring time.
- Take a screenshot of the commands. You can skip this for the second
and third measurements.
- Complete row #1 of the following table. Put the "real time" value into the
table cell.
- Repeat these instructions 2 more times for a total of three runs.
- Calculate the average of each column.
Experiment # | First rsync | Second rsync |
1 | | |
2 | | |
3 | | |
Average | | |
-
Create the following summary table of averages:
Method | Average First Copy | Average Second Copy |
scp | | |
rsync | | |