Take a look at: CAC Virtual Workshop for Data Transfer: rsync
i.e. to copy from your campus laptop to your home directory on the BRB cluster:
If you are not on campus, connect to the Weill VPN.
2. We recommend one uses screen
program to conduct the copy in the background:
open terminal window and type:
* At the prompt 'press space' or 'return to end': press space (you remain in screen)
Note: |
3. rsync -av laptopFromDir/ loginid@scu-login01.med.cornell.edu:~/loginToDir/
Note: Be careful with '/' or without the slashes using |
Copy Files from Remote to Local
rsync -av loginid@scu-login01.med.cornell.edu:~/loginToDir/ laptopFromDir/ |
Copy a Directory Locally
rsync -a /path/to/source/directory/ /path/to/destination/directory/ |
rsync
is a powerful tool with many useful options. Here’s a quick list of examples:
-a
: Archive mode, preserving symbolic links, devices, attributes, permissions, and ownership.
rsync -a /path/to/source/ /path/to/destination/directory/ |
-v
: Verbose mode, providing detailed information during the transfer.
rsync -v /path/to/source/ /path/to/destination/directory/ |
-r
: Recursively syncs folders.
rsync -r /path/to/source/ /path/to/destination/directory/ |
-nv
: Performs a verbose dry run, showing what the command would do without actually making any changes.
rsync -nv /path/to/source/ /path/to/destination/directory/ |
-z
: Compresses the data during transfer to save bandwidth.
rsync -az /path/to/source/ /path/to/destination/directory/ |
-P
: Combines --partial
and --progress
, keeping partially transferred files and showing progress during transfer.
rsync -P /path/to/source/ /path/to/destination/directory/ rsync -av --partial --progress /source/path/ /destination/path/ |
--delete
: Deletes files in the destination that are not present in the source, ensuring the destination is an exact mirror of the source.
rsync -av --delete /path/to/source/ /path/to/destination/directory/ |
-t
: Preserves modification times of files.
rsync -t /path/to/source/ /path/to/destination/directory/ |
--update
: Avoids overwriting newer files in the destination.
rsync -av --update /source/path/ /destination/path/ |
--ignore-existing
: Skips files that already exist in the destination. It only copies new files, leaving existing ones unchanged.
rsync -av --ignore-existing /source/path/ /destination/path/ |