Transferring data: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 74: Line 74:
<!--T:26-->
<!--T:26-->
When transferring files into the <code>/project</code> file systems, do not use <code>-p</code> and <code>-g</code> flags since the quotas in <code>/project</code> are enforced based on group ownership, and thus preserving the group ownership will lead to the [[Frequently_Asked_Questions#Disk_quota_exceeded_error_on_.2Fproject_filesystems | Disk quota exceeded]] error message.  Since <code>-a</code> includes <code>-p</code> and <code>-g</code> by default, the <code>--no-g --no-p</code> options should be added, like so
When transferring files into the <code>/project</code> file systems, do not use <code>-p</code> and <code>-g</code> flags since the quotas in <code>/project</code> are enforced based on group ownership, and thus preserving the group ownership will lead to the [[Frequently_Asked_Questions#Disk_quota_exceeded_error_on_.2Fproject_filesystems | Disk quota exceeded]] error message.  Since <code>-a</code> includes <code>-p</code> and <code>-g</code> by default, the <code>--no-g --no-p</code> options should be added, like so
{{Command|rsync -avz --no-g --no-p LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/}}
{{Command|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 <code>-z</code> option compresses files before transferring them and should be used when appropriate since it can consume significant local cpu resources.  If you are transferring very large files add <code>--partial</code> so interrupted transfers maybe restarted as follows
where LOCALNAME can be a directory or file preceded by its path location and somedir will be created if it doesn't exist.  The <code>-z</code> option compresses files requiring additional cpu resources while the <code>-h</code> option makes file sizes human readable.  If you are transferring very large files add the <code>--partial</code> option so interrupted transfers maybe restarted:
{{Command|rsync -avz --no-g --no-p --partial --progress LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/}}
{{Command|rsync -avzh --no-g --no-p --partial --progress LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/}}
The <code>--progress</code> 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 perfect transfer progress of all files, by doing
The <code>--progress</code> 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:
{{Command|rsync -az --no-g --no-p --info{{=}}progress2 LOCALNAME someuser@graham.computecanada.ca:projects/def-professor/someuser/somedir/}}
{{Command|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
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:
{{Command|rsync -avz --no-g --no-p someuser@graham.computecanada.ca:REMOTENAME ~/projects/def-professor/someuser/somedir/}}
{{Command|rsync -avh --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 be used within a single system to transfer a directory or file (from home or scratch) into project by dropping the cluster name as follows
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 be used within a single system to transfer a directory or file (from home or scratch) into project by dropping the cluster name as follows:
{{Command|rsync -avz --no-g --no-p LOCALNAME ~/projects/def-professor/someuser/somedir/}}
{{Command|rsync -avh --no-g --no-p LOCALNAME ~/projects/def-professor/someuser/somedir/}}
where once again somedir will be created if it doesn't already exist and LOCALNAME placed into it.
where somedir will be created if it doesn't already exist and LOCALNAME placed into it.


===Using checksums to check if files match=== <!--T:13-->
===Using checksums to check if files match=== <!--T:13-->
cc_staff
1,857

edits