Translations:Transferring data/26/en
When transferring files into the /project
file systems, do not use -p
and -g
flags since the quotas in /project
are enforced based on group ownership, and thus preserving the group ownership will lead to the Disk quota exceeded error message. Since -a
includes -p
and -g
by default, the --no-g --no-p
options should be added, like so
[name@server ~]$ rsync -avzh --no-g --no-p LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/
where LOCALNAME can be a directory or file preceded by its path location and somedir will be created if it doesn't exist. The -z
option compresses files (not in the default file suffixes --skip-compress
list) and requires additional cpu resources while the -h
option makes transferred file sizes human readable. If you are transferring very large files add the --partial
option so interrupted transfers maybe restarted:
[name@server ~]$ rsync -avzh --no-g --no-p --partial --progress LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/
The --progress
option will display the percent progress of each file as its transferred. If you are transferring very many smaller files, then it maybe more desirable to display a single progress bar that represents the transfer progress of all files:
[name@server ~]$ rsync -azh --no-g --no-p --info=progress2 LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/
The above rsync examples all involve transfers from a local system into a project directory on a remote system. Rsync transfers from a remote system into a project directory on a local system work in much the same way, for example:
[name@server ~]$ rsync -avzh --no-g --no-p someuser@graham.computecanada.ca:REMOTENAME ~/projects/def-professor/someuser/somedir/
where REMOTENAME can be a directory or file preceded by its path location and somedir will be created if it doesn't already exist. In its simplest incarnation rsync can also be used locally within a single system to transfer a directory or file (from home or scratch) into project by dropping the cluster name:
[name@server ~]$ rsync -avh --no-g --no-p LOCALNAME ~/projects/def-professor/someuser/somedir/
where somedir will be created if it doesn't already exist before copying LOCALNAME into it. For comparison purposes, the copy command can similarely be used to transfer LOCALNAME from home to project by doing:
[name@server ~]$ cp -rv --preserve="mode,timestamps" LOCALNAME ~/projects/def-professor/someuser/somedir/
however unlike rsync, if LOCALNAME is a directory, it will be renamed to somedir if somedir does not exist.