Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

These are the keys I find most useful:

keydescription
-vverbose
-uupdate -> skip files that are newer on the receiver
-rrecurse into directories
-tpreserve modification times
-ppreserve permissions -> Do not use when copying files to the Alliance!
-lcopy symbolic links as symbolic links - see note below
-Ltransform symbolic link into referent file/dir - see note below

Note: One can use only either '-l' or '-L'. By default symbolic links will not get transferred!

Source & destination

If the source contains more than one file the destination must be a directory.

Either the source or the destination can be on another computer, that is accessible via ssh.

If one of them is on another computer the source resp. destination location must be preceded by the name of the computer (HOST) and if the username is different also by the username on the remote computer:

      [username@]HOST:source
resp.
      [username@]HOST:destination

Putting transfer command in background

To be able to log out after having started a transfer one can "put the transfer command in the background" the following way:

    rsync [keys] source destination > logfile  2>&1 &

The 'logfile' needs to be specified to be in an existing directory on the local computer. It will contain what usually appears on the scree when executing the command.

Examples

a) Narval → UQAM

To copying data from Narval to a computer at UQAM one needs to go on the UQAM computer and fetch the data from Narval with, for example:

    rsync  -ruvtp   username_on_Narval@narval.computecanada.ca:source_on_Narval   directory_at_UQAM

b) UQAM → Narval

To copying data from UQAM to Narval one needs to go on the UQAM computer and push the data from from UQAM, for example:

    rsync  -ruvt  source_at_UQAM   username_on_Narval@narval.computecanada.ca:destination_on_Narval


MacOS  ou Linux (nos serveurs)

...